From 589ea77b987bf9855b097bff1f0f5182a99449c7 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 6 Feb 2026 22:19:07 +0000 Subject: [PATCH] Add healthcheck and start-first update for l1-server 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 --- docker-compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 6367905..3cca086 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: