2021-06-24 11:10:15 +00:00
|
|
|
#!/bin/bash
|
2021-06-24 10:36:27 +00:00
|
|
|
|
|
|
|
# Run our web init startup
|
|
|
|
/sbin/init php-fpm &
|
|
|
|
|
2021-06-24 11:10:15 +00:00
|
|
|
# Wait for DB to start
|
|
|
|
# If DB_HOST not set, source the env file
|
|
|
|
[ -z "${DB_HOST}" -a -r .env ] && . .env
|
|
|
|
|
|
|
|
while ! wait-for-it -h ${DB_HOST} -p ${DB_PORT} -t 5 -q; do
|
|
|
|
echo "? Waiting for database at ${DB_HOST}:${DB_PORT}"
|
|
|
|
sleep 1;
|
|
|
|
done
|
|
|
|
echo "- DB is active on ${DB_HOST}:${DB_PORT}"
|
|
|
|
|
2021-06-24 10:36:27 +00:00
|
|
|
exec ./artisan server:start
|