Skip to content

Commit

Permalink
Add celery flower (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
wozniakpl authored Aug 6, 2024
1 parent a802646 commit cec020d
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ src/hope_payment_gateway/static
.vscode

.pdm-python
pdm.toml
pdm.toml

/__pypackages__
19 changes: 18 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ services:
command: |
sh -c "
entrypoint.sh ./docker/wait-for-it.sh db:5432
entrypoint.sh ./docker/wait-for-it.sh redis:6379
entrypoint.sh celery_worker
"
environment: *django-env
Expand All @@ -101,6 +102,7 @@ services:
command: |
sh -c "
entrypoint.sh ./docker/wait-for-it.sh db:5432
entrypoint.sh ./docker/wait-for-it.sh redis:6379
entrypoint.sh celery_beat
"
environment: *django-env
Expand All @@ -111,4 +113,19 @@ services:
db:
condition: service_healthy
redis:
condition: service_healthy
condition: service_healthy

celery_flower:
build:
context: .
dockerfile: docker/Dockerfile
target: dev
ports:
- 5555:5555
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
command: |
sh -c "
entrypoint.sh ./docker/wait-for-it.sh redis:6379
entrypoint.sh celery_flower
"
3 changes: 3 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ case "$1" in
celery_beat)
celery -A hope_payment_gateway.celery beat -l info
;;
celery_flower)
celery flower -A hope_payment_gateway.celery --address=0.0.0.0 --broker=$CELERY_BROKER_URL
;;
*)
exec "$@"
;;
Expand Down
58 changes: 57 additions & 1 deletion pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ dev = [
"types-redis",
"unittest-xml-reporting",
"watchdog",
"flower>=2.0.1",
]
[project]
authors = [
Expand Down

0 comments on commit cec020d

Please sign in to comment.