Add healthcheck and start-first update for l1-server
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m47s
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:
@@ -75,6 +75,12 @@ services:
|
|||||||
- CACHE_DIR=/data/cache
|
- CACHE_DIR=/data/cache
|
||||||
# DATABASE_URL, ADMIN_TOKEN, ARTDAG_CLUSTER_KEY,
|
# DATABASE_URL, ADMIN_TOKEN, ARTDAG_CLUSTER_KEY,
|
||||||
# L2_SERVER, L2_DOMAIN, IPFS_GATEWAY_URL from .env file
|
# 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:
|
volumes:
|
||||||
- l1_cache:/data/cache
|
- l1_cache:/data/cache
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -86,6 +92,8 @@ services:
|
|||||||
- externalnet
|
- externalnet
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
update_config:
|
||||||
|
order: start-first
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
placement:
|
placement:
|
||||||
|
|||||||
Reference in New Issue
Block a user