85 lines
1.9 KiB
YAML
85 lines
1.9 KiB
YAML
|
---
|
||
|
|
||
|
# The goal of this compose file is to have a testing ground for understanding
|
||
|
# what cases we need to handle to get stable deployments. For that, we need to
|
||
|
# work with healthchecks and deploy configurations quite closely. If you run
|
||
|
# the `make symlink` target then this will be loaded into a "fake" app on your
|
||
|
# local machine which you can deploy with `abra`.
|
||
|
|
||
|
version: "3.8"
|
||
|
services:
|
||
|
r1_should_work:
|
||
|
image: redis:alpine
|
||
|
deploy:
|
||
|
update_config:
|
||
|
failure_action: rollback
|
||
|
order: start-first
|
||
|
rollback_config:
|
||
|
order: start-first
|
||
|
restart_policy:
|
||
|
max_attempts: 1
|
||
|
healthcheck:
|
||
|
test: redis-cli ping
|
||
|
interval: 2s
|
||
|
retries: 3
|
||
|
start_period: 1s
|
||
|
timeout: 3s
|
||
|
|
||
|
r2_broken_health_check:
|
||
|
image: redis:alpine
|
||
|
deploy:
|
||
|
update_config:
|
||
|
failure_action: rollback
|
||
|
order: start-first
|
||
|
rollback_config:
|
||
|
order: start-first
|
||
|
restart_policy:
|
||
|
max_attempts: 3
|
||
|
healthcheck:
|
||
|
test: foobar
|
||
|
interval: 2s
|
||
|
retries: 3
|
||
|
start_period: 1s
|
||
|
timeout: 3s
|
||
|
|
||
|
r3_no_health_check:
|
||
|
image: redis:alpine
|
||
|
deploy:
|
||
|
update_config:
|
||
|
failure_action: rollback
|
||
|
order: start-first
|
||
|
rollback_config:
|
||
|
order: start-first
|
||
|
restart_policy:
|
||
|
max_attempts: 3
|
||
|
|
||
|
r4_disabled_health_check:
|
||
|
image: redis:alpine
|
||
|
deploy:
|
||
|
update_config:
|
||
|
failure_action: rollback
|
||
|
order: start-first
|
||
|
rollback_config:
|
||
|
order: start-first
|
||
|
restart_policy:
|
||
|
max_attempts: 3
|
||
|
healthcheck:
|
||
|
disable: true
|
||
|
|
||
|
r5_should_also_work:
|
||
|
image: redis:alpine
|
||
|
deploy:
|
||
|
update_config:
|
||
|
failure_action: rollback
|
||
|
order: start-first
|
||
|
rollback_config:
|
||
|
order: start-first
|
||
|
restart_policy:
|
||
|
max_attempts: 1
|
||
|
healthcheck:
|
||
|
test: redis-cli ping
|
||
|
interval: 2s
|
||
|
retries: 3
|
||
|
start_period: 1s
|
||
|
timeout: 3s
|