Add health check to ensure Docker Swarm stops old containers after new one is healthy
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user