Add SKIP_CHOWN flag to close #170

This commit is contained in:
Ric Harvey
2017-09-05 13:23:27 +01:00
parent 62032f9e1a
commit 1bbcaf2204
3 changed files with 8 additions and 3 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -58,8 +58,10 @@ if [ ! -d "/var/www/html/.git" ]; then
fi
fi
${GIT_COMMAND} /var/www/html || exit 1
if [ -z "$SKIP_CHOWN" ]; then
chown -Rf nginx.nginx /var/www/html
fi
fi
fi
# Enable custom nginx config files if they exist
@@ -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
if [ -z "$SKIP_CHOWN" ]; then
chown -Rf nginx.nginx /var/www/html
fi
fi
# Run custom scripts