From 6ab3b73d618b3d58b8c1b0a1324d1985cb02d56b Mon Sep 17 00:00:00 2001 From: Chris McKnight Date: Sat, 15 Sep 2018 00:00:24 -0500 Subject: [PATCH] feat(docker): allow configUrl to be used in Docker (via #4881) Closes #4861 --- Dockerfile | 1 + docker-run.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8a1d2f86..eeb030e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ ENV OAUTH_ADDITIONAL_PARAMS "**None**" ENV SWAGGER_JSON "/app/swagger.json" ENV PORT 8080 ENV BASE_URL "" +ENV CONFIG_URL "" COPY nginx.conf /etc/nginx/ diff --git a/docker-run.sh b/docker-run.sh index ed8828b8..2e31f42e 100644 --- a/docker-run.sh +++ b/docker-run.sh @@ -58,6 +58,11 @@ if [[ -n "$API_URLS" ]]; then sed -i "s|^\(\s*\)url: .*,|\1urls: $API_URLS,|g" $INDEX_FILE fi +if [[ -n "$CONFIG_URL" ]]; then + sed -i "s|^\(\s*\)url: .*,|\1configUrl: '$CONFIG_URL',|g" $INDEX_FILE + sed -i "s|^\(\s*\)urls: .*,|\1configUrl: '$CONFIG_URL',|g" $INDEX_FILE +fi + # replace the PORT that nginx listens on if PORT is supplied if [[ -n "${PORT}" ]]; then sed -i "s|8080|${PORT}|g" /etc/nginx/nginx.conf -- GitLab