From 120eb537a6c4104d640766e061acc13846dd7ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Wed, 8 Feb 2023 19:48:00 +0100 Subject: [PATCH] fix: worker health check --- README.md | 6 +++--- docker/dev/docker-compose.yml | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dbac4e2..2e9c7d3 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ Builds and starts the docker containers. ``` # Bindings -http://localhost:8000 => API +http://localhost:5555 => Celery dashboard +http://localhost:8000 => API http://localhost:8000/docs => API docs -http://localhost:5555 => Celery dashboard -./whisperbox.sqlite => Database +./whisperbox.sqlite => Database ``` ## Destroy diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index 7f38809..ab92d92 100644 --- a/docker/dev/docker-compose.yml +++ b/docker/dev/docker-compose.yml @@ -33,8 +33,8 @@ services: volumes: - ../../:/code depends_on: - redis: - condition: service_started + worker: + condition: service_healthy worker: build: @@ -51,7 +51,7 @@ services: networks: - app healthcheck: - test: ["CMD-SHELL", "celery inspect ping -A app.worker.main.transcribe -d celery@$$HOSTNAME"] + test: ["CMD-SHELL", "celery -b redis://redis:6379/0 inspect ping -d celery@$$HOSTNAME"] interval: 5s timeout: 5s retries: 5 @@ -63,7 +63,8 @@ services: ports: - 5555:5555 depends_on: - - redis + worker: + condition: service_healthy networks: - app