Skip to content

Commit 1bbcaf2

Browse files
author
Ric Harvey
committed
Add SKIP_CHOWN flag to close #170
1 parent 62032f9 commit 1bbcaf2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/config_flags.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ The following flags are a list of all the currently supported options that can b
2323
- **PUID** : Set to UserID you want to use for nginx (helps permissions when using local volume)
2424
- **REMOVE_FILES** : Use REMOVE_FILES=0 to prevent the script from clearing out /var/www/html (useful for working with local files)
2525
- **APPLICATION_ENV** : set this to development to prevent composer deleteing local dev dependancies
26+
- **SKIP_CHOWN** : set to 1 to avoid running chown -Rf on /var/www/html

docs/versioning.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The latest tag will always follow the master branch in git. the other versions w
3333
| 1.3.1 | 1.3.1 |1.13.4 | 7.1.8 | 3.4 | 0.3.1 |
3434
| 1.3.2 | 1.3.2 |1.13.4 | 7.1.8 | 3.4 | 0.3.2 |
3535
| 1.3.3 | 1.3.3 |1.13.4 | 7.1.9 | 3.4 | 0.3.2 |
36+
| 1.3.4 | 1.3.4 |1.13.4 | 7.1.9 | 3.4 | 0.3.3 |
3637

3738
These tags will be created as releases on GitHub and as tags in docker hub.
3839

scripts/start.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ if [ ! -d "/var/www/html/.git" ]; then
5858
fi
5959
fi
6060
${GIT_COMMAND} /var/www/html || exit 1
61-
chown -Rf nginx.nginx /var/www/html
61+
if [ -z "$SKIP_CHOWN" ]; then
62+
chown -Rf nginx.nginx /var/www/html
63+
fi
6264
fi
6365
fi
6466

@@ -170,8 +172,9 @@ if [ ! -z "$PUID" ]; then
170172
addgroup -g ${PGID} nginx
171173
adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx -u ${PUID} nginx
172174
else
173-
# Always chown webroot for better mounting
174-
chown -Rf nginx.nginx /var/www/html
175+
if [ -z "$SKIP_CHOWN" ]; then
176+
chown -Rf nginx.nginx /var/www/html
177+
fi
175178
fi
176179

177180
# Run custom scripts

0 commit comments

Comments
 (0)