Features: 1) Add healthcheck for celery worker service in docker-compose; 2) Add dependent services with healthcheck conditions for beat.
Fixes: n/a; Extra: n/a;
This commit is contained in:
parent
ed4d761741
commit
ea92c67373
1 changed files with 10 additions and 0 deletions
|
|
@ -169,6 +169,12 @@ services:
|
|||
elasticsearch:
|
||||
condition: service_healthy
|
||||
logging: *default-logging
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "celery -A evibes status | grep -q 'OK'" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
|
||||
beat:
|
||||
container_name: beat
|
||||
|
|
@ -186,6 +192,10 @@ services:
|
|||
depends_on:
|
||||
worker:
|
||||
condition: service_healthy
|
||||
stock_updater:
|
||||
condition: service_healthy
|
||||
database:
|
||||
condition: service_healthy
|
||||
logging: *default-logging
|
||||
healthcheck:
|
||||
test: [ "CMD", "bash", "-c", "pgrep -f 'celery beat' >/dev/null" ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue