validate_timestamps=0 hacía que PHP-FPM sirviera código viejo para siempre; el opcache_reset del entrypoint corre en CLI (OPcache separado) y no limpiaba el de FPM. Ahora valida mtimes cada 2s — costo despreciable para un ERP. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
61 lines
1.7 KiB
INI
61 lines
1.7 KiB
INI
[PHP]
|
|
; Performance
|
|
memory_limit = 256M
|
|
max_execution_time = 300
|
|
max_input_time = 300
|
|
post_max_size = 100M
|
|
upload_max_filesize = 100M
|
|
|
|
; Error reporting
|
|
display_errors = Off
|
|
display_startup_errors = Off
|
|
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
|
log_errors = On
|
|
error_log = /var/log/php-error.log
|
|
|
|
; Date
|
|
date.timezone = America/Bogota
|
|
|
|
; Security
|
|
expose_php = Off
|
|
allow_url_fopen = On
|
|
allow_url_include = Off
|
|
disable_functions =
|
|
|
|
; cURL - usar CA bundle del sistema (Alpine actualizado)
|
|
[curl]
|
|
curl.cainfo = /etc/ssl/certs/ca-certificates.crt
|
|
|
|
; Session — usar variables de entorno para Redis (Coolify las inyecta)
|
|
; REDIS_DB separa las sesiones por despliegue (Redis tiene DBs 0-15).
|
|
; Despliegue A: REDIS_DB=0 (default). Despliegue B: REDIS_DB=1.
|
|
session.save_handler = redis
|
|
session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?auth=${REDIS_PASSWORD}&database=${REDIS_DB}"
|
|
session.gc_maxlifetime = 3600
|
|
session.cookie_httponly = 1
|
|
session.use_strict_mode = 1
|
|
|
|
; OPcache (importante para performance)
|
|
opcache.enable = 1
|
|
opcache.enable_cli = 0
|
|
opcache.memory_consumption = 128
|
|
opcache.interned_strings_buffer = 8
|
|
opcache.max_accelerated_files = 10000
|
|
opcache.max_wasted_percentage = 5
|
|
; validate_timestamps=1 + revalidate_freq=2: OPcache revisa mtimes cada 2s,
|
|
; así los deploys se reflejan solos. (validate_timestamps=0 servía código viejo
|
|
; para siempre porque el opcache_reset del entrypoint corre en CLI, no en FPM.)
|
|
opcache.validate_timestamps = 1
|
|
opcache.revalidate_freq = 2
|
|
opcache.fast_shutdown = 1
|
|
|
|
; Realpath cache (mejora performance de includes)
|
|
realpath_cache_size = 4096K
|
|
realpath_cache_ttl = 600
|
|
|
|
; Output buffering
|
|
output_buffering = 4096
|
|
|
|
; Redis
|
|
extension = redis.so
|