more docker changes
This commit is contained in:
parent
b7da8532ba
commit
1ac13c82fa
3 changed files with 70 additions and 9 deletions
24
.dev/docker/entrypoint.sh
Normal file
24
.dev/docker/entrypoint.sh
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/ash
|
||||
cd /app
|
||||
|
||||
tini -- php-fpm
|
||||
|
||||
until nc -z -v -w30 $DB_HOST 3306
|
||||
do
|
||||
echo "Waiting for database connection..."
|
||||
# wait for 5 seconds before check again
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if [ "$(cat .env)" == "" ]; then
|
||||
cat /app/.env.example > /app/.env
|
||||
fi
|
||||
|
||||
if [ "$(cat .env | grep APP_KEY)" == "APP_KEY=" ]; then
|
||||
echo "Generating New Key"
|
||||
php artisan key:generate --force
|
||||
fi
|
||||
|
||||
php artisan migrate --seed --force
|
||||
echo "Done"
|
||||
nginx -g 'pid /tmp/nginx.pid; daemon off;'
|
Loading…
Add table
Add a link
Reference in a new issue