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 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-06 21:44:43 +02:00
co-authored by Claude Sonnet 5
parent bc42adcad9
commit 8d9d7874f3
+5
View File
@@ -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}"