-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (72 loc) · 1.62 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: "3.9"
services:
mysql:
image: mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=password
ports:
- 3306:3306
deploy:
placement:
constraints:
- node.labels.host==beelink1
node1:
image: beelink1:5000/sea-battle:latest
environment:
- API_ENABLED=on
- ARTERY_HOST=node1
- ARTERY_PORT=2551
- SEED1_HOST=node1
- SEED1_PORT=2551
- SEED2_HOST=node2
- SEED2_PORT=2552
- DB_HOST=mysql
- HEALTH_PORT=8558
ports:
- 8080:8080
# - 8558:8558
healthcheck:
test: curl -sS http://127.0.0.1:8558/ready || echo 1
interval: 5s
timeout: 3s
retries: 5
deploy:
placement:
constraints:
- node.labels.host==beelink1
replicas: 1
# update_config:
# parallelism: 1
# order: start-first
# failure_action: rollback
# delay: 3s
# rollback_config:
# parallelism: 0
# order: stop-first
# restart_policy:
# condition: any
# delay: 5s
# max_attempts: 3
# window: 30s
node2:
image: beelink1:5000/sea-battle:latest
# ports:
# - 8559:8558
environment:
- ARTERY_HOST=node2
- ARTERY_PORT=2552
- SEED1_HOST=node1
- SEED1_PORT=2551
- SEED2_HOST=node2
- SEED2_PORT=2552
- DB_HOST=mysql
- HEALTH_PORT=8558
healthcheck:
test: curl -sS http://127.0.0.1:8558/ready || echo 1
interval: 5s
timeout: 3s
retries: 5
deploy:
placement:
constraints:
- node.labels.host==beelink2