Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use swarm deploy restart #81

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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