-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
executable file
·60 lines (57 loc) · 1.86 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
50
51
52
53
54
55
56
57
58
59
60
version: '3.4'
services:
bus:
restart: always
image: traefik:v2.3
volumes:
- './bus/config:/config'
- '/var/run/docker.sock:/var/run/docker.sock'
ports:
- '80:80' #front
- '8080:8080' #traefik dashboard
- '7001:7001' #epSvc
command: >-
--accesslog=true
--api.insecure=true
--global.checkNewVersion=false
--global.sendAnonymousUsage=false
--log.level=DEBUG
--entryPoints.epFront.address=:80
--entryPoints.epSvc.address=:7001
--providers.file.watch=true
--providers.file.directory=/config
--providers.docker
--providers.docker.constraints=Label(`traefik.autodetect`,`true`)
front:
image: nginx:mainline-alpine
volumes:
- './front/dist:/usr/share/nginx/html:ro'
labels:
- traefik.autodetect=true
#router: front-static-dc
- traefik.http.routers.front-static-dc.priority=1 #i.e the lowest
- traefik.http.routers.front-static-dc.entryPoints=epFront
- traefik.http.routers.front-static-dc.rule=PathPrefix(`/`)
- traefik.http.routers.front-static-dc.middlewares=cors@file
svc:
image: lcdev-poc/svr:latest
environment:
- ENV=compose
- REDIS_HOST=db-redis
- REDIS_PORT=6379
labels:
- traefik.autodetect=true
#router: front-api-dc
- traefik.http.routers.front-api-dc.priority=999
- traefik.http.routers.front-api-dc.entryPoints=epFront
- traefik.http.routers.front-api-dc.rule=PathPrefix(`/api`)
- traefik.http.routers.front-api-dc.middlewares=cors@file,api@file
#router: svc-dc
- traefik.http.routers.svc-dc.priority=999
- traefik.http.routers.svc-dc.entryPoints=epSvc
- traefik.http.routers.svc-dc.rule=PathPrefix(`/`)
- traefik.http.routers.svc-dc.middlewares=cors@file
db-redis:
image: 'redis'
ports:
- '6379:6379'