FossilRepo

Fix Docker health check: accept redirects, increase start period, Caddy starts without waiting

lmata 2026-04-07 16:10 trunk
Commit 078489d21aaa087c1c25aff879ebed3b7333671cbbd257afb962f9195d6368d0
1 file changed +5 -5
+5 -5
--- install.sh
+++ install.sh
@@ -1200,15 +1200,15 @@
12001200
condition: service_healthy
12011201
redis:
12021202
condition: service_healthy
12031203
restart: unless-stopped
12041204
healthcheck:
1205
- test: [\"CMD-SHELL\", \"curl -f http://localhost:8000/health/ || exit 1\"]
1206
- interval: 30s
1205
+ test: [\"CMD-SHELL\", \"curl -sf -o /dev/null -w '%{http_code}' http://localhost:8000/health/ | grep -qE '200|301|302' || exit 1\"]
1206
+ interval: 15s
12071207
timeout: 10s
1208
- retries: 3
1209
- start_period: 40s
1208
+ retries: 5
1209
+ start_period: 60s
12101210
12111211
celery-worker:
12121212
build:
12131213
context: ./src
12141214
dockerfile: Dockerfile
@@ -1282,11 +1282,11 @@
12821282
- caddy-data:/data
12831283
- caddy-config:/config
12841284
- static-files:/srv/static:ro
12851285
depends_on:
12861286
app:
1287
- condition: service_healthy
1287
+ condition: service_started
12881288
restart: unless-stopped
12891289
${litestream_service}
12901290
volumes:
12911291
pgdata:
12921292
redisdata:
12931293
--- install.sh
+++ install.sh
@@ -1200,15 +1200,15 @@
1200 condition: service_healthy
1201 redis:
1202 condition: service_healthy
1203 restart: unless-stopped
1204 healthcheck:
1205 test: [\"CMD-SHELL\", \"curl -f http://localhost:8000/health/ || exit 1\"]
1206 interval: 30s
1207 timeout: 10s
1208 retries: 3
1209 start_period: 40s
1210
1211 celery-worker:
1212 build:
1213 context: ./src
1214 dockerfile: Dockerfile
@@ -1282,11 +1282,11 @@
1282 - caddy-data:/data
1283 - caddy-config:/config
1284 - static-files:/srv/static:ro
1285 depends_on:
1286 app:
1287 condition: service_healthy
1288 restart: unless-stopped
1289 ${litestream_service}
1290 volumes:
1291 pgdata:
1292 redisdata:
1293
--- install.sh
+++ install.sh
@@ -1200,15 +1200,15 @@
1200 condition: service_healthy
1201 redis:
1202 condition: service_healthy
1203 restart: unless-stopped
1204 healthcheck:
1205 test: [\"CMD-SHELL\", \"curl -sf -o /dev/null -w '%{http_code}' http://localhost:8000/health/ | grep -qE '200|301|302' || exit 1\"]
1206 interval: 15s
1207 timeout: 10s
1208 retries: 5
1209 start_period: 60s
1210
1211 celery-worker:
1212 build:
1213 context: ./src
1214 dockerfile: Dockerfile
@@ -1282,11 +1282,11 @@
1282 - caddy-data:/data
1283 - caddy-config:/config
1284 - static-files:/srv/static:ro
1285 depends_on:
1286 app:
1287 condition: service_started
1288 restart: unless-stopped
1289 ${litestream_service}
1290 volumes:
1291 pgdata:
1292 redisdata:
1293

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button