Skip to content

Commit 504f68c

Browse files
authored
deploy params (#18)
1 parent 802749b commit 504f68c

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

docker-compose.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ services:
99
- influxdb_business
1010
- influxdb_gf
1111
restart: always
12+
deploy:
13+
placement:
14+
constraints:
15+
- "node.role==manager"
1216

1317
grafana:
1418
image: grafana/grafana:latest
@@ -25,6 +29,10 @@ services:
2529
- ./Grafana/dashboards:/etc/grafana/provisioning/dashboards
2630
networks:
2731
- influxdb_gf
32+
deploy:
33+
placement:
34+
constraints:
35+
- "node.role==manager"
2836

2937
auth-server:
3038
image: mihneadinik/auth-server:latest
@@ -35,14 +43,17 @@ services:
3543
DB_HOSTNAME: mongo
3644
DB_NAME: clients_db
3745
DB_PORT: 27017
38-
# restart: always
3946
ports:
4047
- "6001:6001"
4148
depends_on:
4249
- mongo
4350
networks:
4451
- mongo-auth
4552
- kong-auth
53+
deploy:
54+
replicas: 3
55+
restart_policy:
56+
condition: on-failure
4657

4758
io-service:
4859
image: mihneadinik/io-service:latest
@@ -60,6 +71,10 @@ services:
6071
networks:
6172
- mongo-io
6273
- business-io
74+
deploy:
75+
replicas: 3
76+
restart_policy:
77+
condition: on-failure
6378

6479
business-service:
6580
image: mihneadinik/business-service:latest
@@ -75,6 +90,10 @@ services:
7590
- business-io
7691
- influxdb_business
7792
- kong-business
93+
deploy:
94+
replicas: 3
95+
restart_policy:
96+
condition: on-failure
7897

7998
mongo:
8099
image: mongo:latest
@@ -92,6 +111,10 @@ services:
92111
- mongo-network
93112
ports:
94113
- "27017:27017"
114+
deploy:
115+
placement:
116+
constraints:
117+
- "node.role==manager"
95118

96119

97120
mongo-gui:
@@ -107,6 +130,10 @@ services:
107130
ME_CONFIG_MONGODB_SERVER: mongo
108131
networks:
109132
- mongo-network
133+
deploy:
134+
placement:
135+
constraints:
136+
- "node.role==manager"
110137

111138
kong:
112139
image: kong:latest
@@ -128,6 +155,12 @@ services:
128155
networks:
129156
- kong-business
130157
- kong-auth
158+
deploy:
159+
placement:
160+
constraints:
161+
- "node.role==manager"
162+
restart_policy:
163+
condition: on-failure
131164

132165
volumes:
133166
mongo_data: {}

0 commit comments

Comments
 (0)