Skip to content

Commit

Permalink
added celery and redis to docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
JJFlorian committed Mar 15, 2024
1 parent 224926b commit c09a921
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bro_hub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
# Automatically discover tasks in Django app
CELERY_IMPORTS = ("api.tasks",)
# TODO: fix celery env settings
CELERY_BROKER_URL = "redis://localhost:6379/0"
CELERY_BROKER_URL = "redis://redis:6379/0"

# BRO SETTINGS
BRO_UITGIFTE_SERVICE_URL = "https://publiek.broservices.nl"
Expand Down
40 changes: 40 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@ services:
volumes:
- pgdata:/var/lib/postgresql/data
restart: unless-stopped
networks:
- backend

redis:
image: redis:latest
expose:
- 6379
ports:
- "6379:6379"
networks:
- backend

celery:
environment:
- DJANGO_SETTINGS_MODULE=bro_hub.settings
- FIELD_ENCRYPTION_KEY="DUMMY-NEEDS-PROD-SETTING-Xgb1GczqZe909UMNc4=
build: .
command: celery -A bro_hub worker --loglevel=INFO
volumes:
- .:/code
links:
- redis
depends_on:
- db
- redis
networks:
- backend

web:
build: .
Expand All @@ -32,6 +59,19 @@ services:
# - NENS_AUTH_ISSUER
# - NENS_AUTH_CLIENT_ID
# - NENS_AUTH_CLIENT_SECRET
depends_on:
- db
- redis
- celery
networks:
- backend




volumes:
pgdata:

networks:
backend:
name: bro_hub

0 comments on commit c09a921

Please sign in to comment.