Browse Source

feature(docker-image): allow custom nginx port within container (#4086)

* Use PORT to override nginx listen port when defined
* Add dockerignore to make build context smaller
bubble
David Muto 6 years ago
committed by kyle
parent
commit
5b1dbec9b0
3 changed files with 11 additions and 1 deletions
  1. +7
    -0
      .dockerignore
  2. +1
    -1
      Dockerfile
  3. +3
    -0
      docker-run.sh

+ 7
- 0
.dockerignore View File

@@ -0,0 +1,7 @@
/.git
/.github
/dev-helpers
/docs
/src
/swagger-ui-dist-package
/test

+ 1
- 1
Dockerfile View File

@@ -12,7 +12,7 @@ ENV OAUTH_REALM "**None**"
ENV OAUTH_APP_NAME "**None**"
ENV OAUTH_ADDITIONAL_PARAMS "**None**"
ENV SWAGGER_JSON "/app/swagger.json"
ENV PORT 80
ENV PORT 8080
ENV BASE_URL ""

RUN apk add --update nginx


+ 3
- 0
docker-run.sh View File

@@ -53,4 +53,7 @@ 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

exec nginx -g 'daemon off;'

Loading…
Cancel
Save