-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
49 lines (48 loc) · 1.47 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: "3.7"
services:
api:
image: xopera-api
build: .
environment:
DEBUG: "true"
LOG_LEVEL: debug
labels:
- "traefik.enable=true"
- "traefik.http.services.api.loadbalancer.server.port=8080"
- "traefik.http.routers.api.rule=PathPrefix(`/`)"
- "traefik.http.routers.api.entrypoints=web"
ui:
image: swaggerapi/swagger-ui:v3.35.0
volumes:
- ./openapi-spec.yml:/openapi.yml:ro
environment:
SWAGGER_JSON: /openapi.yml
labels:
- "traefik.enable=true"
- "traefik.http.services.ui.loadbalancer.server.port=8080"
- "traefik.http.routers.ui.rule=PathPrefix(`/ui`)"
- "traefik.http.routers.ui.middlewares=stripprefix-ui"
- "traefik.http.middlewares.stripprefix-ui.stripprefix.prefixes=/ui"
- "traefik.http.routers.ui.entrypoints=web"
proxy:
image: library/traefik:v2.3.1
command:
- "--accesslog=true"
- "--log.level=info"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
# don't use the following in production scenarios!
- "--api.insecure=true"
- "--api.dashboard=true"
- "--entrypoints.traefik.address=:8081"
depends_on:
# - api
- ui
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "8080:80"
# don't use this in production scenarios!
- "127.0.0.1:8081:8081"