Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3913985
D258.id601.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
578 B
Referenced Files
None
Subscribers
None
D258.id601.diff
View Options
diff --git a/files/usr/local/bin/setup-container b/files/usr/local/bin/setup-container
--- a/files/usr/local/bin/setup-container
+++ b/files/usr/local/bin/setup-container
@@ -2,8 +2,18 @@
pushd /var/wwwroot/default
-if [ -z "$NO_INSTALL" ]; then
+# Generates a unique application key in .env
+function generate_key {
+ if [ ! -f ".env" ]; then
+ echo "APP_KEY=SomeRandomString" > .env
+ fi
php artisan key:generate
+}
+
+if [ -z "$NO_INSTALL" ]; then
+ if [ -z "$APP_KEY" ]; then
+ generate_key
+ fi
php artisan config:cache
chown app:app /var/wwwroot/default
fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 12:42 (20 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2308067
Default Alt Text
D258.id601.diff (578 B)
Attached To
Mode
D258: Ensure APP_KEY is defined
Attached
Detach File
Event Timeline
Log In to Comment