Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768949
setup-container
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
587 B
Referenced Files
None
Subscribers
None
setup-container
View Options
#!/usr/bin/env bash
pushd
/var/wwwroot/default
# Generates a unique application key in .env
function
generate_key
{
KEY
=
`
php artisan key:generate --show
`
echo
""
>> .env
echo
"APP_KEY=
$KEY
"
>> .env
}
# Determines if APP_KEY is missing
function
is_app_key_missing
{
if
[
-v APP_KEY
]
;
then
return
0
fi
if
[
! -f .env
]
;
then
return
1
fi
grep -q
'APP_KEY='
.env
return
$?
}
if
[
-z
"
$NO_INSTALL
"
]
;
then
is_app_key_missing
if
[
$?
-eq
1
]
;
then
generate_key
fi
php artisan config:cache
chown app:app /var/wwwroot/default
fi
# We're done
popd
touch .initialized
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Mon, Nov 25, 11:34 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260096
Default Alt Text
setup-container (587 B)
Attached To
Mode
rDNOTIF Notifications center Docker image
Attached
Detach File
Event Timeline
Log In to Comment