Simplified deploy/drain timeouts
Remove `stop_wait_time` and `readiness_timeout` from the root config and remove `deploy_timeout` and `drain_timeout` from the proxy config. Instead we'll just have `deploy_timeout` and `drain_timeout` in the root config. For roles that run the proxy, they are passed to the kamal-proxy deploy command. Once that returns we can assume the container is ready to shut down. For other roles, we'll use the `deploy_timeout` when polling the container to see if it is ready and the `drain_timeout` when stopping the container.
This commit is contained in:
@@ -20,8 +20,9 @@ env:
|
||||
secret:
|
||||
- SECRET_TAG
|
||||
asset_path: /usr/share/nginx/html/versions
|
||||
proxy:
|
||||
deploy_timeout: 2s
|
||||
deploy_timeout: 2
|
||||
drain_timeout: 2
|
||||
readiness_delay: 0
|
||||
|
||||
registry:
|
||||
server: registry:4443
|
||||
@@ -39,5 +40,3 @@ accessories:
|
||||
cmd: sh -c 'echo "Starting busybox..."; trap exit term; while true; do sleep 1; done'
|
||||
roles:
|
||||
- web
|
||||
stop_wait_time: 1
|
||||
readiness_delay: 0
|
||||
|
||||
@@ -9,8 +9,30 @@ servers:
|
||||
hosts:
|
||||
- vm3
|
||||
cmd: sleep infinity
|
||||
deploy_timeout: 2
|
||||
drain_timeout: 2
|
||||
readiness_delay: 0
|
||||
|
||||
proxy:
|
||||
deploy_timeout: 2s
|
||||
healthcheck:
|
||||
interval: 1
|
||||
timeout: 1
|
||||
path: "/up"
|
||||
response_timeout: 2
|
||||
buffering:
|
||||
requests: true
|
||||
responses: true
|
||||
memory: 400_000
|
||||
max_request_body: 40_000_000
|
||||
max_response_body: 40_000_000
|
||||
forward_headers: true
|
||||
logging:
|
||||
request_headers:
|
||||
- Cache-Control
|
||||
- X-Forwarded-Proto
|
||||
response_headers:
|
||||
- X-Request-ID
|
||||
- X-Request-Start
|
||||
|
||||
asset_path: /usr/share/nginx/html/versions
|
||||
|
||||
@@ -30,8 +52,6 @@ accessories:
|
||||
cmd: sh -c 'echo "Starting busybox..."; trap exit term; while true; do sleep 1; done'
|
||||
roles:
|
||||
- web
|
||||
stop_wait_time: 1
|
||||
readiness_delay: 0
|
||||
aliases:
|
||||
whome: version
|
||||
worker_hostname: app exec -r workers -q --reuse hostname
|
||||
|
||||
Reference in New Issue
Block a user