-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-stack.yml
64 lines (55 loc) · 1.25 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
version: "3.3"
services:
app_server:
image: saarthak08/fsp-backend
ports:
- "8080:8080"
networks:
- backend
depends_on:
- db
environment: # Pass environment variables to the service
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/fsp?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
SPRING_DATASOURCE_USERNAME: Saarthak
SPRING_DATASOURCE_PASSWORD: testing
deploy:
replicas: 1
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
db:
image: mysql:5.7
volumes:
- db-data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- backend
deploy:
replicas: 1
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
environment:
MYSQL_DATABASE: fsp
MYSQL_USER: Saarthak
MYSQL_PASSWORD: testing
MYSQL_ROOT_PASSWORD: root
visualizer:
image: dockersamples/visualizer
ports:
- "3000: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: