Skip to content

Stack of containers with Celery application based in Django, Celery Worker, Celery Beat and RabbitMQ

Notifications You must be signed in to change notification settings

mrbrazzi/my_django_celery_stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Stack

Implementation of Producer-Consumer using Docker containers with Django App, Celery Worker & Beat and RabbitMQ.

How to setup initial configurations

Setup database configuration

Make a copy of .env-sample

cp .env-sample .env

Setup database configuration. Update values for:

DB_NAME=<db_name>

Setup Celery configuration

In file .env, created before when setup database configuration; update values for:

# RABBITMQ
BROKER_USER=<broker_user>
BROKER_PASSWORD=<broker_user_password>
BROKER_HOST=<broker_server_ip_or_hostname|localhost>
BROKER_PORT=<broker_server_port|5672>

# CELERY
CELERY_TASK_DEFAULT_QUEUE=<default_tasks_queue_name|my_stack_dq>
CELERY_TASK_DEFAULT_EXCHANGE=<default_tasks_exchange_name|my_stack_ex>
CELERY_TASK_DEFAULT_ROUTING_KEY=<default_tasks_routing_key|my_stack_rk>

Start the stack with Docker

From root directory execute:

docker-compose -f .container/docker-compose up -d

Using RabbitMQ Manager tool

Start the stack with Docker

Visit url http://localhost:15672/

username: rabbitmq_admin
password: RabbitMqAdminPassWord

Create user for Celery Worker and Celery Beat

Login in RabbitMQ Manager Tool

Click in Admin menu option

Click in Add a user

  • Set as Username: celery_user
  • Set as Passowrd: celery_password
  • Set as Tags: management
  • Click button Add User

Set permissions for created user

Login in RabbitMQ Manager Tool

Edit the created user: celery_user

In Permissions section, set as Virtual Host the value: /

Click the button Set permission

Using Celery Browser

Start the stack with Docker

Visit url http://localhost:8008/

About

Stack of containers with Celery application based in Django, Celery Worker, Celery Beat and RabbitMQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •