-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
57 lines (57 loc) · 1.26 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
version: "3.1"
services:
server:
image: ${IMAGE}
environment:
TLS_KEY: /run/secrets/tls_key
TLS_CERT: /run/secrets/tls_cert
TOKEN_PASSWORD: /run/secrets/token_password
command: server
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
secrets:
- tls_cert
- tls_key
- token_password
networks:
- webnet
ports:
- "8000:8000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
check:
image: ${IMAGE}
environment:
NODE: "{{.Node.ID}}"
X509_USER_KEY: /run/secrets/tls_key
X509_USER_CERT: /run/secrets/tls_cert
TOKEN_PASSWORD: /run/secrets/token_password
command: ["check", "-f=cmd/actuary/mac-default.toml", "-s=https://server:8000/results"]
deploy:
mode: global
resources:
limits:
cpus: "0.1"
memory: 50M
restart_policy:
condition: on-failure
secrets:
- tls_cert
- tls_key
- token_password
networks:
- webnet
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
webnet:
driver: overlay
secrets:
tls_cert:
file: ./domain.crt
tls_key:
file: ./domain.key
token_password:
file: ./token_password.txt