fix: worker health check

This commit is contained in:
Felix Spöttel
2023-02-08 19:48:00 +01:00
parent 42ff269018
commit 120eb537a6
2 changed files with 8 additions and 7 deletions

View File

@@ -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

View File

@@ -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