Private
Public Access
1
0

chg: pkg: make compatible the whole project with bare metal AND with docker #4

This commit is contained in:
2026-04-13 11:56:50 +02:00
parent e9c6795eb7
commit 4239177563
10 changed files with 240 additions and 9 deletions

18
docker/entrypoint.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
set -e
echo "[entrypoint] Waiting for database..."
until php -r "new PDO('pgsql:host=db;port=5432;dbname=${POSTGRES_DB}', '${POSTGRES_USER}', '${POSTGRES_PASSWORD}');" 2>/dev/null; do
echo "[entrypoint] Database not ready, retrying in 2s..."
sleep 2
done
echo "[entrypoint] Database is ready."
echo "[entrypoint] Warming up Symfony cache..."
php bin/console cache:warmup
echo "[entrypoint] Running database migrations..."
php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
echo "[entrypoint] Starting FrankenPHP..."
exec frankenphp run --config /etc/caddy/Caddyfile "$@"