Add health check to ensure Docker Swarm stops old containers after new one is healthy

This commit is contained in:
2026-04-09 09:44:56 -04:00
parent 8c302ed55a
commit 2e08b6e66a

View File

@@ -3,3 +3,9 @@ cmds = ["npm run build"]
[start] [start]
cmd = "npx serve dist -l 80 -s" cmd = "npx serve dist -l 80 -s"
[healthcheck]
cmd = "curl -f http://localhost:80/ || exit 1"
interval = "10s"
timeout = "5s"
retries = 3