pixelfed/worker-entrypoint.sh

22 lines
395 B
Bash
Raw Normal View History

2020-05-30 10:52:02 +00: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 17:11:53 +00: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 10:52:02 +00:00
gosu www-data php artisan horizon