diff --git a/Dockerfile b/Dockerfile index 66a6ebef..c26714ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ MAINTAINER fehguy ENV VERSION "v2.2.10" ENV FOLDER "swagger-ui-2.2.10" ENV API_URL "http://petstore.swagger.io/v2/swagger.json" +ENV API_URLS "" ENV API_KEY "**None**" ENV OAUTH_CLIENT_ID "**None**" ENV OAUTH_CLIENT_SECRET "**None**" diff --git a/docker-run.sh b/docker-run.sh index 6ed3000a..580e4289 100644 --- a/docker-run.sh +++ b/docker-run.sh @@ -53,7 +53,14 @@ if [[ -n "$VALIDATOR_URL" ]]; then unset TMP_VU fi -# replace the PORT that nginx listens on if supplied -if [[ -n "${PORT}" ]]; then sed -i "s|8080|${PORT}|g" /etc/nginx/nginx.conf; fi +# replace `url` with `urls` option if API_URLS is set +if [[ -n "$API_URLS" ]]; then + sed -i "s|url: .*,|urls: $API_URLS,|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 +fi exec nginx -g 'daemon off;'