Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rabbitmq as celery broker #342

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update config and setup for rabbitmq as celery broker
Hakan committed May 9, 2024
commit 40025a429f30b947ae2a0065786820c478d33748
15 changes: 15 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -112,3 +112,18 @@ services:
redis:
image: redis:alpine
container_name: datamart_redis

rabbitmq:
image: rabbitmq:3.12.14-management-alpine
container_name: datamart_rabbitmq
environment:
RABBITMQ_ERLANG_COOKIE: "FORRABBITMQCLUSTERNODES"
RABBITMQ_DEFAULT_USER: "datamart"
RABBITMQ_DEFAULT_PASS: "unicef"
RABBITMQ_DEFAULT_VHOST: "/datamart"
ports:
- "15672:15672"
- "5672:5672"
volumes:
- $PWD/build/rabbitmq/data:/var/lib/rabbitmq
- $PWD/build/rabbitmq/log:/var/log/rabbitmq
17 changes: 16 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -99,4 +99,19 @@ services:

redis:
image: redis:alpine
container_name: datamart_redis
container_name: datamart_redis

rabbitmq:
image: rabbitmq:3.12.14-management-alpine
container_name: datamart_rabbitmq
environment:
RABBITMQ_ERLANG_COOKIE: "FORRABBITMQCLUSTERNODES"
RABBITMQ_DEFAULT_USER: "datamart"
RABBITMQ_DEFAULT_PASS: "unicef"
RABBITMQ_DEFAULT_VHOST: "/datamart"
ports:
- "15672:15672"
- "5672:5672"
volumes:
- $PWD/build/rabbitmq/data:/var/lib/rabbitmq
- $PWD/build/rabbitmq/log:/var/log/rabbitmq
5 changes: 3 additions & 2 deletions src/etools_datamart/config/settings.py
Original file line number Diff line number Diff line change
@@ -34,8 +34,9 @@
CACHE_URL_LOCK=(str, "redis://127.0.0.1:6379/2?key_prefix=lock"),
CACHE_URL_TEMPLATE=(str, "redis://127.0.0.1:6379/2?key_prefix=template"),
CELERY_TASK_ALWAYS_EAGER=(bool, False),
CELERY_BROKER_URL=(str, "redis://127.0.0.1:6379/2"),
CELERY_RESULT_BACKEND=(str, "redis://127.0.0.1:6379/3"),
CELERY_BROKER_URL=(str, "amqp://datamart:unicef@rabbitmq:5672/datamart"),
CELERY_RESULT_BACKEND=(str, "amqp"),
#CELERY_RESULT_DBURI=(str,"amqp://datamart:unicef@rabbitmq:5672/datamart")
CSRF_COOKIE_SECURE=(bool, True),
EXPLORER_TOKEN=(str, "EXPLORER_DATAMART_TOKEN"),
IGNORED_SCHEMAS=(str, ["public", "uat", "frg"]),