From b4ae2718f70d22ad8f6adbe6b798c2a47e00193a Mon Sep 17 00:00:00 2001 From: MatheusAlves96 Date: Tue, 21 Apr 2026 01:32:06 -0300 Subject: [PATCH] fix: restart_policy any + remove dockerfile healthcheck causing swarm complete state --- docker-compose.prod.yml | 8 ++++++-- frontend/Dockerfile.prod | 3 --- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index c49f13e..a5b963e 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -36,7 +36,9 @@ services: deploy: replicas: 1 restart_policy: - condition: on-failure + condition: any + delay: 5s + max_attempts: 5 labels: - "traefik.enable=true" - "traefik.docker.network=proxy" @@ -58,7 +60,9 @@ services: deploy: replicas: 1 restart_policy: - condition: on-failure + condition: any + delay: 5s + max_attempts: 5 labels: - "traefik.enable=true" - "traefik.docker.network=proxy" diff --git a/frontend/Dockerfile.prod b/frontend/Dockerfile.prod index 1929c4a..ff17211 100644 --- a/frontend/Dockerfile.prod +++ b/frontend/Dockerfile.prod @@ -23,6 +23,3 @@ COPY --from=builder /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 - -HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \ - CMD wget -qO- http://localhost/health || exit 1