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

21 lines
546 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
2020-02-17 22:28:57 +01:00
echo "Loading fixtures. Please wait..."
bin/console doctrine:fixtures:load --no-interaction
2020-02-04 17:20:39 +01:00
touch "$FIRST_RUN_FLAG_FILE"
fi
bin/console server:run 0.0.0.0:8001