Merge pull request #2666 from Yomanz/patch-1
Use app key from environment
This commit is contained in:
commit
ce425435d4
|
@ -20,10 +20,15 @@ else
|
||||||
touch /app/var/.env
|
touch /app/var/.env
|
||||||
|
|
||||||
## manually generate a key because key generate --force fails
|
## manually generate a key because key generate --force fails
|
||||||
|
if [ -z $APP_KEY ]; then
|
||||||
echo -e "Generating key."
|
echo -e "Generating key."
|
||||||
APP_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
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 "Generated app key: $APP_KEY"
|
||||||
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
|
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
|
||||||
|
else
|
||||||
|
echo -e "APP_KEY exists in environment, using that."
|
||||||
|
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
|
||||||
|
fi
|
||||||
|
|
||||||
ln -s /app/var/.env /app/
|
ln -s /app/var/.env /app/
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue