diff --git a/Dockerfile b/Dockerfile index 8a1d2f86dd009c9617b76b9e47207a6ffd0bee4a..eeb030e50f69f75c4550029badd68120255df8b9 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 ed8828b8aab6d85fa4c5e883111cceb6d6e183e3..2e31f42e7743462e5c48fc3c8c1f3745f437e71a 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