diff --git a/Website/launch.sh b/Website/launch.sh index a9a7e4e..3b5480b 100755 --- a/Website/launch.sh +++ b/Website/launch.sh @@ -6,6 +6,15 @@ cd "$SCRIPT_DIR" DOCKER_CMD=() SECRETS_FILE="$SCRIPT_DIR/.mongo-secrets.env" +RESET_MONGO_DATA=0 + +for arg in "$@"; do + case "$arg" in + --reset-mongo-data|-r) + RESET_MONGO_DATA=1 + ;; + esac +done ensure_mongo_secrets() { if [ -f "$SECRETS_FILE" ]; then @@ -145,7 +154,7 @@ is_truthy() { } reset_mongo_data_if_requested() { - if ! is_truthy "${MONGO_RESET_DATA:-0}"; then + if ! is_truthy "${MONGO_RESET_DATA:-0}" && [ "$RESET_MONGO_DATA" -ne 1 ]; then return 0 fi