Add healthcheck and start-first update for l1-server
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m47s

Zero-downtime deploys: new container starts and passes health
check before the old one is stopped. Caddy always has a healthy
backend to proxy to.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-06 22:19:07 +00:00
parent f5ef9cddd2
commit 589ea77b98

View File

@@ -75,6 +75,12 @@ services:
- CACHE_DIR=/data/cache
# DATABASE_URL, ADMIN_TOKEN, ARTDAG_CLUSTER_KEY,
# L2_SERVER, L2_DOMAIN, IPFS_GATEWAY_URL from .env file
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8100/')"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
volumes:
- l1_cache:/data/cache
depends_on:
@@ -86,6 +92,8 @@ services:
- externalnet
deploy:
replicas: 1
update_config:
order: start-first
restart_policy:
condition: on-failure
placement: