add schedule:work-er
parent
fb8ca34892
commit
f8ec9c4305
|
@ -48,6 +48,7 @@ COPY --from=builder /var/www /var/www
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
COPY worker-entrypoint.sh /worker-entrypoint.sh
|
COPY worker-entrypoint.sh /worker-entrypoint.sh
|
||||||
COPY websockets-entrypoint.sh /websockets-entrypoint.sh
|
COPY websockets-entrypoint.sh /websockets-entrypoint.sh
|
||||||
|
COPY schedule-entrypoint.sh /schedule-entrypoint.sh
|
||||||
COPY wait-for-db.php /wait-for-db.php
|
COPY wait-for-db.php /wait-for-db.php
|
||||||
COPY --from=builder /usr/local/lib/php/extensions/no-debug-non-zts-20210902 /usr/local/lib/php/extensions/no-debug-non-zts-20210902
|
COPY --from=builder /usr/local/lib/php/extensions/no-debug-non-zts-20210902 /usr/local/lib/php/extensions/no-debug-non-zts-20210902
|
||||||
COPY --from=builder /usr/local/etc/php/conf.d /usr/local/etc/php/conf.d
|
COPY --from=builder /usr/local/etc/php/conf.d /usr/local/etc/php/conf.d
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/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
|
Loading…
Reference in New Issue