File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,12 +28,19 @@ services:
2828 done
2929 # Configure a healthcheck to allow `make dev.up.<servce>` to give accurate feedback about
3030 # whether the service actually started successfully and is serving traffic.
31- # Set HEALTHCHECK_TARGET to the full URL curl should hit, e.g. "http://localhost:18000/heartbeat"
31+ #
32+ # Set HEALTHCHECK_TARGET to the full URL curl should hit, e.g.:
33+ #
34+ # environment:
35+ # HEALTHCHECK_TARGET: "http://localhost:18150/health/"
36+ #
37+ # Timings are sized so the worst case from container start to "give up"
38+ # (marked unhealthy) is ~5 minutes: start_period + retries*interval = 300s = 5min.
3239 healthcheck :
3340 test : ["CMD-SHELL", "curl -fsS $$HEALTHCHECK_TARGET || exit 1"]
3441 interval : 10s
3542 timeout : 10s
36- retries : 20
43+ retries : 6
3744 start_period : 240s
3845 start_interval : 5s # poll fast during grace period so a healthy boot flips status quickly
3946
@@ -68,11 +75,13 @@ services:
6875 image : node:18
6976 environment :
7077 - NODE_ENV=development
71- # More generous than backend-app because a cold `npm ci` can take
72- # several minutes.
78+ # MFEs take longer to startup: a cold `npm ci` + `npm start` is empirically
79+ # observed to reach healthy in about 5 minutes, so we shouldn't give up
80+ # until at least ~10 minutes. start_period + retries*interval = 600s = 10min.
7381 healthcheck :
7482 test : ["CMD-SHELL", "curl -fsS $$HEALTHCHECK_TARGET || exit 1"]
7583 interval : 10s
7684 timeout : 10s
77- retries : 30
78- start_period : 300s
85+ retries : 6
86+ start_period : 540s
87+ start_interval : 5s # poll fast during grace period so a healthy boot flips status quickly
You can’t perform that action at this time.
0 commit comments