Skip to content

Commit

Permalink
Add new flag REMOVE_FILES to close #121
Browse files Browse the repository at this point in the history
  • Loading branch information
Ric Harvey committed Mar 16, 2017
1 parent fb035e0 commit aa551a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/config_flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ The following flags are a list of all the currently supported options that can b
- **RUN_SCRIPTS** : Set to 1 to execute scripts
- **PGID** : Set to GroupId you want to use for nginx (helps permissions when using local volume)
- **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)
1 change: 1 addition & 0 deletions docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The latest tag will always follow the master branch in git. the other versions w
| 1.1.3 | 1.1.3 |1.11.10 | 7.1.2 | 3.4 | 0.2.6 |
| 1.1.4 | 1.1.4 |1.11.10 | 7.1.2 | 3.4 | 0.2.6 |
| 1.1.5 | 1.1.5 |1.11.10 | 7.1.2 | 3.4 | 0.2.7 |
| 1.1.6 | 1.1.6 |1.11.10 | 7.1.2 | 3.4 | 0.2.8 |

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

Expand Down
8 changes: 6 additions & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ fi
if [ ! -d "/var/www/html/.git" ]; then
# Pull down code from git for our site!
if [ ! -z "$GIT_REPO" ]; then
# Remove the test index file
rm -Rf /var/www/html/*
# Remove the test index file if you are pulling in a git repo
if [ ! -z ${REMOVE_FILES} ] && [ ${REMOVE_FILES} == 0 ]; then
echo "skiping removal of files"
else
rm -Rf /var/www/html/*
fi
GIT_COMMAND='git clone '
if [ ! -z "$GIT_BRANCH" ]; then
GIT_COMMAND=${GIT_COMMAND}" -b ${GIT_BRANCH}"
Expand Down

0 comments on commit aa551a9

Please sign in to comment.