fix(deploy): move router config write to after health check passes
Router had no profile so it was always included in `up -d --wait`. Writing the new target's config BEFORE the wait caused the router to become unhealthy if the new slot failed — leaving it in a broken state for the next deploy attempt. Now: router keeps its old config (pointing to the still-running old slot) during the health check wait, so it stays healthy throughout. Config is only written and nginx -s reload triggered after the new slot passes its health check. This is the correct blue-green pattern. Also add `retries: 3` and `start_period: 10s` to the router health check for resilience against transient startup failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,8 @@ services:
|
||||
test: ["CMD", "nginx", "-t"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
litestream:
|
||||
image: litestream/litestream:latest
|
||||
|
||||
Reference in New Issue
Block a user