14 lines
512 B
Bash
14 lines
512 B
Bash
#!/bin/sh
|
|
|
|
# Sleep for a second to ensure DB is awake and ready
|
|
SLEEP_TIME=$(shuf -i 2-5 -n 1)
|
|
echo "> Sleeping for ${SLEEP_TIME} seconds to wait for the database"
|
|
echo "> If there are errors after the migration runs, it's possible another container (scheduler, worker, etc.) already ran the migrations"
|
|
sleep $SLEEP_TIME
|
|
|
|
# Provision database
|
|
php /var/www/bin/console doctrine:migrations:migrate --no-interaction
|
|
php /var/www/bin/console db:seed
|
|
|
|
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|