generated from boboko/starter
22 lines
737 B
Bash
22 lines
737 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# queue/scheduler: no composer/migrate/asset-publish here (that's entrypoint.sh, run
|
|
# by app only) — just wait for app's migration to finish, then start the process.
|
|
mkdir -p storage/app/public storage/framework/cache storage/framework/sessions storage/framework/views storage/logs storage/framework bootstrap/cache
|
|
|
|
if [ "$APP_ENV" != "production" ]; then
|
|
echo "[entrypoint] Waiting for migrations to complete..."
|
|
timeout=60
|
|
while [ ! -f storage/framework/migrated ] && [ "$timeout" -gt 0 ]; do
|
|
sleep 1
|
|
timeout=$((timeout - 1))
|
|
done
|
|
if [ ! -f storage/framework/migrated ]; then
|
|
echo "[entrypoint] Timed out waiting for migrations" >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
exec "$@"
|