Skip to content

Commit

Permalink
Add setup.sh. Replace a container of swagger-ui to nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
hodanov committed Aug 8, 2021
1 parent ab133fc commit f910e01
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
12 changes: 5 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ services:
ports:
- 8090:8080
volumes:
- ./spec/specification.yml:/specification.yml
- ./dist/specification.yml:/specification.yml
environment:
SWAGGER_FILE: /specification.yml
swagger-ui:
image: swaggerapi/swagger-ui
nginx:
image: nginx:alpine
container_name: dev-swagger-ui
ports:
- 8091:8080
- 8091:80
volumes:
- ./spec/specification.yml:/specification.yml
environment:
SWAGGER_JSON: /specification.yml
- ./dist:/usr/share/nginx/html
8 changes: 8 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!bash

touch specification.yml
docker container run -d --name tmp-swagger-ui -e SWAGGER_JSON=/specification.yml -v $(pwd)/specification.yml:/specification.yml swaggerapi/swagger-ui
docker container cp tmp-swagger-ui:/usr/share/nginx/html ./dist
docker container rm -f tmp-swagger-ui
rm ./dist/specification.yml
mv specification.yml ./dist/
1 change: 0 additions & 1 deletion spec/specification.yml → spec/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ components:
Pet:
required:
- name
- photoUrls
type: object
properties:
id:
Expand Down

0 comments on commit f910e01

Please sign in to comment.