Page MenuHomeDevCentral

setup-container
No OneTemporary

setup-container

#!/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

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)

Event Timeline