From 8d9d7874f39ae66e86bccf3d400d8116bb22feb1 Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 6 Sep 2026 21:44:43 +0200 Subject: [PATCH] setup.sh: restart php after cache warm opcache.validate_timestamps=0 means php-fpm won't see updated code/templates until it restarts. Add an explicit `dc restart php` at the end so `./docker/setup.sh --no-build` reliably deploys a git pull. Co-Authored-By: Claude Sonnet 5 --- docker/setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/setup.sh b/docker/setup.sh index 25e938d..3a56290 100755 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -114,6 +114,11 @@ pexec php bin/console asset-map:compile # php-fpm runs as www-data and must be able to write there at runtime. pexec chown -R www-data:www-data var +# php.ini sets opcache.validate_timestamps=0, so php-fpm keeps serving the +# old compiled code/templates until it restarts. Bounce it so a --no-build +# run (git pull + this script) actually picks up the new cache. +dc restart php + # Make sure Nginx Proxy Manager can reach this stack's nginx by name. # Harmless (and a no-op) if already connected; NPM keeps it across restarts. NPM_CONTAINER="${NPM_CONTAINER:-nginx_app_1}"