pixelfed/schedule-entrypoint.sh
chris 130738d005
Some checks failed
dockers/pixelfed/pipeline/head There was a failure building this commit
add schedule:work-er
2023-10-26 11:44:40 +02:00

21 lines
401 B
Bash
Executable file

#!/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
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
gosu www-data php artisan schedule:work