Skip to content

Commit

Permalink
fix: use swarm deploy restart
Browse files Browse the repository at this point in the history
  • Loading branch information
jpantos committed Aug 12, 2024
1 parent acb21a7 commit 74fc2c8
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ networks:

services:
app:
restart: always
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
image: ${DOCKER_REGISTRY-pantosio}/service-node-app:${DOCKER_TAG-local}
build:
context: .
Expand Down Expand Up @@ -41,7 +46,12 @@ services:
- broker
- db
worker:
restart: always
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
image: ${DOCKER_REGISTRY-pantosio}/service-node-worker:${DOCKER_TAG-local}
build:
context: .
Expand Down Expand Up @@ -76,7 +86,12 @@ services:
- app
db:
image: postgres:latest
restart: on-failure
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 10s
Expand All @@ -96,7 +111,12 @@ services:
read_only: true
broker:
image: rabbitmq:latest
restart: on-failure
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
hostname: pantos-service-node
networks:
pantos-service-node:
Expand Down

0 comments on commit 74fc2c8

Please sign in to comment.