Commit 680cb17
Add Docker health checks for reliable startup ordering
Nginx proxy can fail when backend isn't ready yet because `links` only
ensures DNS resolution, not service readiness. Add healthchecks to
postgres (pg_isready), elasticsearch (cluster health), and backend
(/api/health), then use `depends_on: condition: service_healthy` to
enforce postgres+elasticsearch → backend → proxy startup order.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 59d6f67 commit 680cb17
1 file changed
+31
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | | - | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
166 | 183 | | |
167 | 184 | | |
168 | 185 | | |
| |||
304 | 321 | | |
305 | 322 | | |
306 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
307 | 329 | | |
308 | 330 | | |
309 | 331 | | |
| |||
320 | 342 | | |
321 | 343 | | |
322 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
323 | 351 | | |
324 | 352 | | |
325 | 353 | | |
| |||
341 | 369 | | |
342 | 370 | | |
343 | 371 | | |
344 | | - | |
| 372 | + | |
| 373 | + | |
345 | 374 | | |
346 | 375 | | |
347 | 376 | | |
| |||
0 commit comments