Coolify-doc-driven production hardening of the deploy stack: - run the whole stack as non-root www-data; nginx on 8080 (non-privileged), pid in /tmp, user directive dropped (Coolify routes to any port) - docker/healthcheck.sh: hit real /health route via PHP (not just port probe) - split OPcache config into docker/php/opcache.ini - graceful shutdown: supervisord stopsignal/stopwaitsecs + worker stop_grace_period - APCu intentionally not added (Symfony cache uses redis) - DEPLOY.md: 8080 port, non-root, resource-limit guidance Verified on linux/amd64: non-root uid=82, /health 200, migrations run, worker process healthcheck OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
14 lines
619 B
INI
14 lines
619 B
INI
; OPcache — production tuning for ClinicPro.
|
|
; validate_timestamps=0: code never changes at runtime in an immutable image, so
|
|
; skip stat() checks for max throughput. (A new deploy = a new image.)
|
|
; preload: warms the Symfony container/classes into shared memory at FPM start;
|
|
; runs as www-data, so app files must be readable by www-data (see Dockerfile).
|
|
opcache.enable = 1
|
|
opcache.enable_cli = 0
|
|
opcache.memory_consumption = 256
|
|
opcache.max_accelerated_files = 20000
|
|
opcache.validate_timestamps = 0
|
|
opcache.interned_strings_buffer = 16
|
|
opcache.preload = /app/config/preload.php
|
|
opcache.preload_user = www-data
|