-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-stack.yml
51 lines (46 loc) · 959 Bytes
/
docker-stack.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
version: "3"
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: password123
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- backend
deploy:
placement:
constraints: [node.role == manager]
web:
image: twtrubiks/my_django
# volumes:
# - api-data:/docker_api
ports:
- "8000:8000"
networks:
- backend
depends_on:
- db
deploy:
replicas: 10
update_config:
parallelism: 2
restart_policy:
condition: on-failure
visualizer:
image: dockersamples/visualizer:stable
ports:
- "8080:8080"
stop_grace_period: 1m30s
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
networks:
backend:
volumes:
db-data:
# api-data: