Add healthcheck and start-first update for l2-server
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m7s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m7s
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:
@@ -49,6 +49,12 @@ services:
|
|||||||
- IPFS_API=/dns/ipfs/tcp/5001
|
- IPFS_API=/dns/ipfs/tcp/5001
|
||||||
- ANCHOR_BACKUP_DIR=/data/anchors
|
- ANCHOR_BACKUP_DIR=/data/anchors
|
||||||
# DATABASE_URL, ARTDAG_DOMAIN, ARTDAG_USER, JWT_SECRET from .env file
|
# DATABASE_URL, ARTDAG_DOMAIN, ARTDAG_USER, JWT_SECRET from .env file
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8200/')"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 15s
|
||||||
volumes:
|
volumes:
|
||||||
- l2_data:/data/l2 # Still needed for RSA keys
|
- l2_data:/data/l2 # Still needed for RSA keys
|
||||||
- anchor_backup:/data/anchors # Persistent anchor proofs (survives DB wipes)
|
- anchor_backup:/data/anchors # Persistent anchor proofs (survives DB wipes)
|
||||||
@@ -60,6 +66,8 @@ services:
|
|||||||
- ipfs
|
- ipfs
|
||||||
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