From 8f8cfc1ac7134d49937fa93ba531f4363787f059 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 30 Jun 2016 15:08:52 +0100 Subject: [PATCH] Allow user to customise webroot --- scripts/start.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/start.sh b/scripts/start.sh index a6a605c..5de3811 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -11,6 +11,11 @@ if [ ! -z "$SSH_KEY" ]; then chmod 600 /root/.ssh/id_rsa fi +# Set custom webroot +if [ ! -z "$WEBROOT" ]; then + sed -i "s#root /var/www/html;#root ${WEBROOT};#g" /etc/nginx/sites-available/default.conf +fi + # Setup git variables if [ ! -z "$GIT_EMAIL" ]; then git config --global user.email "$GIT_EMAIL"