diff --git a/run.sh b/run.sh index 1d5e3ab..fcef1fc 100755 --- a/run.sh +++ b/run.sh @@ -59,6 +59,17 @@ echo "Starting API" cd /app/ yarn start & +LOG_OPTS="" +LOG_DIR="${LOG_DIR}" + +if [[ -z "$LOG_DIR" ]] && [[ -d "/srv/containers/logs" ]]; then + LOG_DIR=/srv/containers/logs +fi + +if [[ -n "$LOG_DIR" ]]; then + LOG_OPTS="$LOG_OPTS --log-dir \"$LOG_DIR\"" +fi + while true; do echo "==============================================================" @@ -69,6 +80,9 @@ while true; do --delete-names \ --delete-volumes \ --state-file /srv/deployments/webapps/autoremove.state \ + --include-tags "$INCLUDE_TAGS" \ + --exclude-tags "$EXCLUDE_TAGS" \ + $EXTRA_UNDEPLOY_OPTS \ --discover echo "############ DEPLOY #############" @@ -81,6 +95,10 @@ while true; do --record-namespace-dns crn://${DEPLOYMENT_RECORD_NAMESPACE}/dns \ --record-namespace-deployments crn://${DEPLOYMENT_RECORD_NAMESPACE}/deployments \ --state-file /srv/deployments/webapps/autodeploy.state \ + --include-tags "$INCLUDE_TAGS" \ + --exclude-tags "$EXCLUDE_TAGS" \ + $LOG_OPTS \ + $EXTRA_DEPLOY_OPTS \ --discover # Cleanup any build leftovers