Fix database container creation
This commit is contained in:
12
docker/setup.sh
Executable file → Normal file
12
docker/setup.sh
Executable file → Normal 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
|
||||
|
||||
Reference in New Issue
Block a user