Commit 42f7e17
ci: Add healthchecks for zero-downtime deploys
- db: pg_isready
- redis-db: redis-cli ping
- backend: curl /api/v2/stats (start_period: 60s for migrations)
- frontend: curl localhost:3000 (start_period: 30s)
- caddy: depends_on backend+frontend service_healthy
- backend depends_on db+redis service_healthy
Services start in correct order and Caddy only routes traffic
when backend/frontend are confirmed healthy.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 17dfca7 commit 42f7e17
1 file changed
Lines changed: 32 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
52 | | - | |
53 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| |||
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
71 | 89 | | |
72 | 90 | | |
73 | 91 | | |
74 | | - | |
| 92 | + | |
| 93 | + | |
75 | 94 | | |
76 | 95 | | |
77 | 96 | | |
| |||
80 | 99 | | |
81 | 100 | | |
82 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
83 | 108 | | |
84 | 109 | | |
85 | 110 | | |
| |||
171 | 196 | | |
172 | 197 | | |
173 | 198 | | |
174 | | - | |
175 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
176 | 203 | | |
177 | 204 | | |
178 | 205 | | |
| |||
0 commit comments