-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.deploy.yml
61 lines (56 loc) · 1.21 KB
/
docker-compose.deploy.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
61
version: "3.3"
services:
traefik:
image: traefik:1.7.16
ports:
- "80:80"
- "443:443"
- "8090:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /data/traefik/acme.json:/acme.json
configs:
- source: traefik.{{ts}}
target: /etc/traefik/traefik.toml
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
networks:
- overlay_net
api:
secrets:
- jwt-public-key.{{ts}}
- CLIENT_ID
- CLIENT_SECRET
- SHA_SECRET
environment:
- CERT_PUBLIC_KEY_PATH=/run/secrets/jwt-public-key.{{ts}}
deploy:
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host: api.{{hostname}}"
- "traefik.port=4545"
- "traefik.docker.network=opencrvs_overlay_net"
replicas: 2
networks:
- overlay_net
secrets:
jwt-public-key.{{ts}}:
external: true
jwt-private-key.{{ts}}:
external: true
CLIENT_ID:
external: true
CLIENT_SECRET:
external: true
SHA_SECRET:
external: true
configs:
traefik.{{ts}}:
file: ./infrastructure/traefik.toml
networks:
overlay_net:
driver: overlay
attachable: true