Skip to content

Commit c2c97e7

Browse files
committed
use start-first ordering for rollouts to avoid downtime
1 parent 3eaeb20 commit c2c97e7

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎11-deploying-containers/docker-swarm.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ version: '3.7'
22

33
services:
44
client-react:
5-
image: sidpalas/devops-directive-docker-course-client-react-nginx:5
5+
image: sidpalas/devops-directive-docker-course-client-react-nginx:6
66
deploy:
77
mode: replicated
8-
replicas: 2
8+
replicas: 1
9+
update_config:
10+
order: start-first
911
networks:
1012
- frontend
1113
ports:
@@ -20,7 +22,9 @@ services:
2022
image: sidpalas/devops-directive-docker-course-api-node:8
2123
deploy:
2224
mode: replicated
23-
replicas: 2
25+
replicas: 1
26+
update_config:
27+
order: start-first
2428
environment:
2529
- DATABASE_URL_FILE=/run/secrets/database-url
2630
secrets:
@@ -41,6 +45,8 @@ services:
4145
deploy:
4246
mode: replicated
4347
replicas: 2
48+
update_config:
49+
order: start-first
4450
networks:
4551
- frontend
4652
- backend

0 commit comments

Comments
 (0)