2020-05-30 12:52:02 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -xeo pipefail
|
|
|
|
|
|
|
|
php /wait-for-db.php
|
|
|
|
|
|
|
|
if [[ ! -e storage/.docker.init ]];
|
|
|
|
then
|
|
|
|
echo "Database is not initialized yet, exiting..."
|
|
|
|
sleep 5
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-06-08 19:11:53 +02:00
|
|
|
gosu www-data php artisan migrate:status | grep No && migrations=yes || migrations=no
|
|
|
|
if [ $migrations = "yes" ];
|
|
|
|
then
|
|
|
|
echo "Database needs migrations, exiting..."
|
|
|
|
sleep 5
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-05-30 12:52:02 +02:00
|
|
|
gosu www-data php artisan horizon
|