diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 0fbdc6c7..c01f5957 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 9c819fb4..7af06103 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -99,4 +99,19 @@ services: redis: image: redis:alpine - container_name: datamart_redis \ No newline at end of file + 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 diff --git a/src/etools_datamart/config/settings.py b/src/etools_datamart/config/settings.py index c905f75e..b6453c59 100644 --- a/src/etools_datamart/config/settings.py +++ b/src/etools_datamart/config/settings.py @@ -34,7 +34,7 @@ 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_BROKER_URL=(str, "amqp://datamart:unicef@rabbitmq:5672/datamart"), CELERY_RESULT_BACKEND=(str, "redis://127.0.0.1:6379/3"), CSRF_COOKIE_SECURE=(bool, True), EXPLORER_TOKEN=(str, "EXPLORER_DATAMART_TOKEN"),