Using swagger-node
I setup a project using Express
and swagger-ui-express
.
Dockerfile
FROM node:8-alpine
WORKDIR /opt/app
COPY package*.json ./
RUN yarn install
COPY . .
CMD [ "yarn", "start" ]
docker-compose.yaml
version: "3"
services:
app:
build: .
ports:
- 15000:10010
Starting the container
docker-compose up
The graphical API docs are reachable from the outside at http://localhost:15000/api-docs
. However I can't use the "Try it out" function as Swagger takes the internal IP and port.
How can I change this so that the API can be tried from outside the container?