Fix database container creation

This commit is contained in:
Frank
2026-03-10 22:04:23 +01:00
parent 170ae2ce43
commit 184a5ff0de
3 changed files with 17 additions and 4 deletions

12
docker/setup.sh Executable file → Normal file
View File

@@ -104,9 +104,17 @@ fi
# Prepare DB
echo "Creating database if it doesn't exist..."
pexec php bin/console doctrine:database:create --if-not-exists
if ! pexec php bin/console doctrine:database:create --if-not-exists; then
echo "Error: Database creation failed. Check Docker logs for details." >&2
dc logs database
exit 1
fi
echo "Running migrations..."
pexec php bin/console doctrine:migrations:migrate -n
if ! pexec php bin/console doctrine:migrations:migrate -n; then
echo "Error: Migrations failed." >&2
exit 1
fi
# Import JS deps (Importmap/Asset Mapper)
if [ -f "$ROOT_DIR/importmap.php" ]; then