From dbc35c4aa1559f085f5e6a9bc9037e77640fc669 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 28 Oct 2016 10:40:36 +0100 Subject: [PATCH] Closes #89 fixes webroot in SSL setup --- Dockerfile | 3 ++- README.md | 2 +- scripts/letsencrypt-setup | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b63f01..2b99a6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ ENV php_conf /etc/php5/php.ini ENV fpm_conf /etc/php5/php-fpm.conf ENV composer_hash e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae -RUN apk add --no-cache bash \ +RUN apk update && \ + apk add --no-cache bash \ openssh-client \ wget \ supervisor \ diff --git a/README.md b/README.md index 932c789..686386b 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ sudo docker run -d -e 'GIT_NAME=full_name' -e 'GIT_USERNAME=git_username' -e 'GI ``` ### Custom Nginx Config files -Sometimes you need a custom config file for nginx to achieve this read the [Nginx config guide](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/nginx_configs.md) +Sometimes you need a custom config file for nginx to achieve this read the [Nginx config guide](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/nginx_configs.md) ### Scripting and Templating Please see the [Scripting and templating guide](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/scripting_templating.md) for more details. diff --git a/scripts/letsencrypt-setup b/scripts/letsencrypt-setup index a440b85..b216d2a 100755 --- a/scripts/letsencrypt-setup +++ b/scripts/letsencrypt-setup @@ -10,6 +10,10 @@ else # change nginx for webroot and domain name sed -i "s/##DOMAIN##/${DOMAIN}/g" /etc/nginx/sites-enabled/default-ssl.conf sed -i "s#root /var/www/html;#root ${WEBROOT};#g" /etc/nginx/sites-available/default-ssl.conf + if [ ! -z "$WEBROOT" ]; then + webroot=$WEBROOT + sed -i "s#root /var/www/html;#root ${webroot};#g" /etc/nginx/sites-available/default-ssl.conf + fi supervisorctl restart nginx