fix: move cache:warmup to runtime entrypoint, fix POSTGRES_PASSWORD default

cache:warmup at build time fails because .env.local is not available in the
image (gitignored). Moved to entrypoint.sh which runs after volume mounts.
Also added default value for POSTGRES_PASSWORD in docker-compose.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gwadaking
2026-04-01 17:44:05 -04:00
parent 2cef3725e9
commit 7ecb71599d
3 changed files with 21 additions and 7 deletions

8
docker/php/entrypoint.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
set -e
# Warmup du cache Symfony au démarrage (les vars d'env sont disponibles ici)
php bin/console cache:warmup --env=prod --no-debug 2>&1 || true
# Lance FrankenPHP (comportement par défaut de l'image de base)
exec frankenphp run --config /etc/caddy/Caddyfile "$@"