Fixup a logic bug with the waiting for migrations. We can't do that if we're in seperate services, we just have to take it on the chin.
This commit is contained in:
parent
c580ecf331
commit
a87482c871
2 changed files with 16 additions and 13 deletions
|
|
@ -4,12 +4,14 @@ rm -f /var/lock/laravel_horizon_started
|
|||
# If horizon is present, publish the frontend assets, if HORIZON_UI is set to "on"
|
||||
if [ "${HORIZON_ENABLE,,}" = "on" ]; then
|
||||
if [[ -f "/app/config/horizon.php" ]]; then
|
||||
echo "[HORIZON] Waiting until Migration Complete."
|
||||
until [ -f /var/lock/laravel_migration_complete ]
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
echo "[HORIZON] Migration is complete, running Horizon."
|
||||
if [ "${MIGRATE_ENABLE}" = "on" ]; then
|
||||
echo "[HORIZON] Waiting until Migration Complete."
|
||||
until [ -f /var/lock/laravel_migration_complete ]
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
echo "[HORIZON] Migration is complete, running Horizon."
|
||||
fi
|
||||
if [ "${HORIZON_UI,,}" = "on" ]; then
|
||||
echo "[HORIZON] Publishing horizon frontend assets"
|
||||
artisan horizon:publish
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
#!/bin/bash
|
||||
cd /app
|
||||
if [ "${SCHEDULER_ENABLE,,}" = "on" ]; then
|
||||
|
||||
echo "[SCHEDULER] Waiting until Migration Complete."
|
||||
until [ -f /var/lock/laravel_migration_complete ]
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
echo "[SCHEDULER] Migrations complete, starting scheduler"
|
||||
if [ "${MIGRATE_ENABLE}" = "on" ]; then
|
||||
echo "[SCHEDULER] Waiting until Migration Complete."
|
||||
until [ -f /var/lock/laravel_migration_complete ]
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
echo "[SCHEDULER] Migrations complete, starting scheduler"
|
||||
fi
|
||||
while true; do
|
||||
artisan schedule:run
|
||||
sleep 59;
|
||||
|
|
|
|||
Loading…
Reference in a new issue