Browse Source

Merge pull request #33 from triggity/master

Allow overriding of default serving port for Swagger UI
pull/34/head
Johannes Schickling 8 years ago
committed by GitHub
parent
commit
dc1801378a
  1. 1
      swagger-ui/Dockerfile
  2. 1
      swagger-ui/README.md
  3. 2
      swagger-ui/run.sh

1
swagger-ui/Dockerfile

@ -6,6 +6,7 @@ ENV FOLDER "swagger-ui-2.2.0"
ENV API_URL "http://petstore.swagger.io/v2/swagger.json"
ENV API_KEY "**None**"
ENV SWAGGER_JSON "/app/swagger.json"
ENV PORT 80
WORKDIR /app

1
swagger-ui/README.md

@ -12,3 +12,4 @@ $ docker run -d -p 80:80 -e API_URL=http://localhost:4000/swagger schickling/swa
* `API_URL` - Swagger endpoint for your API
* `API_KEY` - Default API Key (optional)
* `PORT` - Default port to run on (optional)

2
swagger-ui/run.sh

@ -16,4 +16,4 @@ else
sed -i "s|http://example.com/api|$API_URL|g" index.html
fi
exec http-server -p 80
exec http-server -p $PORT $*
Loading…
Cancel
Save