fix(docker): add healthcheck and stop grace period
Deploy / verify (push) Successful in 57s
Deploy / deploy (push) Successful in 56s

Watchtower waits for container to be healthy before stopping the old
one. Grace period allows in-flight requests to drain on shutdown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-05-11 14:06:46 +02:00
parent ec9930762d
commit 4dd17b7ac4
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -35,4 +35,7 @@ USER svelte
EXPOSE 3001 EXPOSE 3001
ENV PORT=3001 ENV PORT=3001
HEALTHCHECK --interval=5s --timeout=3s --start-period=15s --retries=3 \
CMD wget -qO- http://localhost:3001/ > /dev/null || exit 1
CMD ["node", "build"] CMD ["node", "build"]
+1
View File
@@ -10,6 +10,7 @@ services:
- image-cache:/data/image-cache - image-cache:/data/image-cache
networks: networks:
- web - web
stop_grace_period: 30s
volumes: volumes:
image-cache: image-cache: