Created
September 26, 2016 15:12
-
-
Save benfavre/13dd77d145447b80c00174d38ad69de3 to your computer and use it in GitHub Desktop.
Boot file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_FRONTEND=noninteractive | |
echo "App boot script" | |
export APP_DATABASE_HOST="db" | |
echo "Setup env variables" | |
/sbin/setuser www-app cp /var/www/html/.env.example /var/www/html/.env && \ | |
sed -i "s|%database_name%|${APP_DATABASE_NAME}|g" /var/www/html/.env && \ | |
sed -i "s|%database_user%|${APP_DATABASE_USER}|g" /var/www/html/.env && \ | |
sed -i "s|%database_password%|${APP_DATABASE_PASSWORD}|g" /var/www/html/.env && \ | |
sed -i "s|%database_host%|${APP_DATABASE_HOST}|g" /var/www/html/.env && \ | |
sed -i "s|%app_environment%|${APP_ENV}|g" /var/www/html/.env && \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment