date-poll-api/docker/dev/entrypoint.sh

21 lines
452 B
Bash
Executable File

#!/bin/bash
# Set configuration
cp docker/dev/env.local ./.env.local
# composer
composer install
# Await MySQL Container being ready
until php bin/console doctrine:query:sql "SELECT 1;" ; do
>&2 echo "MySQL is unavailable - sleeping"
sleep 1
done
# Run Database migrations
php bin/console doctrine:schema:drop --force
php bin/console doctrine:schema:create
php bin/console doctrine:fixtures:load --no-interaction
# Run server
symfony serve