Skip to content

Commit aa551a9

Browse files
author
Ric Harvey
committed
Add new flag REMOVE_FILES to close richarvey#121
1 parent fb035e0 commit aa551a9

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/config_flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ The following flags are a list of all the currently supported options that can b
2121
- **RUN_SCRIPTS** : Set to 1 to execute scripts
2222
- **PGID** : Set to GroupId you want to use for nginx (helps permissions when using local volume)
2323
- **PUID** : Set to UserID you want to use for nginx (helps permissions when using local volume)
24-
24+
- **REMOVE_FILES** : Use REMOVE_FILES=0 to prevent the script from clearing out /var/www/html (useful for working with local files)

docs/versioning.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The latest tag will always follow the master branch in git. the other versions w
2121
| 1.1.3 | 1.1.3 |1.11.10 | 7.1.2 | 3.4 | 0.2.6 |
2222
| 1.1.4 | 1.1.4 |1.11.10 | 7.1.2 | 3.4 | 0.2.6 |
2323
| 1.1.5 | 1.1.5 |1.11.10 | 7.1.2 | 3.4 | 0.2.7 |
24+
| 1.1.6 | 1.1.6 |1.11.10 | 7.1.2 | 3.4 | 0.2.8 |
2425

2526
These tags will be created as releases on GitHub and as tags in docker hub.
2627

scripts/start.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ fi
3636
if [ ! -d "/var/www/html/.git" ]; then
3737
# Pull down code from git for our site!
3838
if [ ! -z "$GIT_REPO" ]; then
39-
# Remove the test index file
40-
rm -Rf /var/www/html/*
39+
# Remove the test index file if you are pulling in a git repo
40+
if [ ! -z ${REMOVE_FILES} ] && [ ${REMOVE_FILES} == 0 ]; then
41+
echo "skiping removal of files"
42+
else
43+
rm -Rf /var/www/html/*
44+
fi
4145
GIT_COMMAND='git clone '
4246
if [ ! -z "$GIT_BRANCH" ]; then
4347
GIT_COMMAND=${GIT_COMMAND}" -b ${GIT_BRANCH}"

0 commit comments

Comments
 (0)