react-logo/misc/containers/backend/docker-entrypoint.sh

18 lines
445 B
Bash
Raw Normal View History

2020-02-04 17:20:39 +01:00
#!/bin/bash
FIRST_RUN_FLAG_FILE="/.first-run"
if [ ! -e "$FIRST_RUN_FLAG_FILE" ]; then
echo "Installing dependencies. Please wait..."
composer install
echo "Waiting for database..."
wait-for-it database:3306 -- echo "Database is up !"
echo "Applying database migrations. Please wait..."
bin/console doctrine:migrations:migrate --no-interaction
touch "$FIRST_RUN_FLAG_FILE"
fi
bin/console server:run 0.0.0.0:8001