From 1bbcaf2204198c2019a2e265384e254c17ef6c3a Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 5 Sep 2017 13:23:27 +0100 Subject: [PATCH] Add SKIP_CHOWN flag to close #170 --- docs/config_flags.md | 1 + docs/versioning.md | 1 + scripts/start.sh | 9 ++++++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/config_flags.md b/docs/config_flags.md index 03885dc..6a958d5 100644 --- a/docs/config_flags.md +++ b/docs/config_flags.md @@ -23,3 +23,4 @@ The following flags are a list of all the currently supported options that can b - **PUID** : Set to UserID you want to use for nginx (helps permissions when using local volume) - **REMOVE_FILES** : Use REMOVE_FILES=0 to prevent the script from clearing out /var/www/html (useful for working with local files) - **APPLICATION_ENV** : set this to development to prevent composer deleteing local dev dependancies + - **SKIP_CHOWN** : set to 1 to avoid running chown -Rf on /var/www/html diff --git a/docs/versioning.md b/docs/versioning.md index d1c7d1e..bd5c21b 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -33,6 +33,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.3.1 | 1.3.1 |1.13.4 | 7.1.8 | 3.4 | 0.3.1 | | 1.3.2 | 1.3.2 |1.13.4 | 7.1.8 | 3.4 | 0.3.2 | | 1.3.3 | 1.3.3 |1.13.4 | 7.1.9 | 3.4 | 0.3.2 | +| 1.3.4 | 1.3.4 |1.13.4 | 7.1.9 | 3.4 | 0.3.3 | These tags will be created as releases on GitHub and as tags in docker hub. diff --git a/scripts/start.sh b/scripts/start.sh index 8eaf931..065e042 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -58,7 +58,9 @@ if [ ! -d "/var/www/html/.git" ]; then fi fi ${GIT_COMMAND} /var/www/html || exit 1 - chown -Rf nginx.nginx /var/www/html + if [ -z "$SKIP_CHOWN" ]; then + chown -Rf nginx.nginx /var/www/html + fi fi fi @@ -170,8 +172,9 @@ if [ ! -z "$PUID" ]; then addgroup -g ${PGID} nginx adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx -u ${PUID} nginx else - # Always chown webroot for better mounting - chown -Rf nginx.nginx /var/www/html + if [ -z "$SKIP_CHOWN" ]; then + chown -Rf nginx.nginx /var/www/html + fi fi # Run custom scripts