Make migrations optional.
This commit is contained in:
parent
9051277cfa
commit
1ba90728c4
1 changed files with 31 additions and 25 deletions
|
|
@ -2,6 +2,8 @@
|
|||
rm -f /var/lock/laravel_migration_underway \
|
||||
/var/lock/laravel_migration_complete
|
||||
|
||||
if [ "${MIGRATE_ENABLE,,}" = "on" ]; then
|
||||
|
||||
# Give a moment for services to wake up
|
||||
echo "[MIGRATION] Waiting until Laravel Ready."
|
||||
sleep 3
|
||||
|
|
@ -32,6 +34,10 @@ rm /var/lock/laravel_migration_underway
|
|||
touch /var/lock/laravel_migration_complete
|
||||
echo "[MIGRATION] Migration complete!";
|
||||
|
||||
else
|
||||
echo "[MIGRATION] Not enabled. Set MIGRATE_ENABLE = on to enable."
|
||||
fi
|
||||
|
||||
# Sleep forever (and sleep again in case the sleep process is killed)
|
||||
while true; do
|
||||
sleep infinity
|
||||
|
|
|
|||
Loading…
Reference in a new issue