File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 2020 touch /app/var/.env
2121
2222 # # manually generate a key because key generate --force fails
23- echo -e " Generating key."
24- APP_KEY=$( cat /dev/urandom | tr -dc ' a-zA-Z0-9' | fold -w 32 | head -n 1)
25- echo -e " Generated app key: $APP_KEY "
26- echo -e " APP_KEY=$APP_KEY " > /app/var/.env
23+ if [ -z " $APP_KEY " ]; then
24+ echo -e " Generating key."
25+ APP_KEY=$( cat /dev/urandom | tr -dc ' a-zA-Z0-9' | fold -w 32 | head -n 1)
26+ echo -e " Generated app key: $APP_KEY "
27+ echo -e " APP_KEY=$APP_KEY " > /app/var/.env
28+ else
29+ echo -e " APP_KEY exists in environment, using that."
30+ echo -e " APP_KEY=$APP_KEY " > /app/var/.env
31+ fi
2732
2833 ln -s /app/var/.env /app/
2934fi
@@ -77,4 +82,4 @@ yarn add cross-env
7782yarn run build:production
7883
7984echo -e " Starting supervisord."
80- exec " $@ "
85+ exec " $@ "
You can’t perform that action at this time.
0 commit comments