key:generate is f'd

This commit is contained in:
Michael (Parker) Parker 2018-08-13 23:33:15 -04:00
parent 63b76c60fb
commit 87e125ddad
3 changed files with 18 additions and 7 deletions

View file

@ -7,15 +7,24 @@ cd /app
if [ -f /app/var/.env ]; then
echo "external vars exist"
rm /app/.env
ln -s /app/var/.env /app/
else
echo "external vars don't exist"
php artisan key:generate --force
cp /app/.env /app/var/
rm /app/.env
touch /app/var/.env
## manually generate a key because key generate --force fails
echo -e "Generating key"
APP_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
echo -e "Generated app key: $APP_KEY"
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
ln -s /app/var/.env /app/
fi
## check for DB up before starting the panel
echo "Checking database status."
zshoecho "Checking database status."
until nc -z -v -w30 $DB_HOST 3306
do
@ -32,7 +41,7 @@ echo -e "Done\n"
## start php-fpm in the background
echo -e "Starting php-fpm in the background. \n"
php-fpm7 -D
echo -e "php-fpm starte.d \n"
echo -e "php-fpm started \n"
## start webserver
echo -e "Starting nginx in the foreground. \n"