Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrbrazzi/my_django_celery_stack
Stack of containers with Celery application based in Django, Celery Worker, Celery Beat and RabbitMQ
https://github.com/mrbrazzi/my_django_celery_stack
Last synced: about 2 months ago
JSON representation
Stack of containers with Celery application based in Django, Celery Worker, Celery Beat and RabbitMQ
- Host: GitHub
- URL: https://github.com/mrbrazzi/my_django_celery_stack
- Owner: mrbrazzi
- Created: 2020-02-21T17:23:21.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-15T20:31:37.000Z (over 2 years ago)
- Last Synced: 2024-05-20T03:20:21.818Z (7 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- cuban-opensource - my-django-celery-stack - Consumer using Docker containers with Django App, Celery Worker & Beat and RabbitMQ. (Web Development / Python)
README
# 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
```bash
cp .env-sample .env
```Setup database configuration. Update values for:
```ini
DB_NAME=
```### Setup Celery configuration
In file **.env**, created before when *[setup database configuration](#setup-database-configuration)*; update values for:
```ini
# RABBITMQ
BROKER_USER=
BROKER_PASSWORD=
BROKER_HOST=
BROKER_PORT=# CELERY
CELERY_TASK_DEFAULT_QUEUE=
CELERY_TASK_DEFAULT_EXCHANGE=
CELERY_TASK_DEFAULT_ROUTING_KEY=
```### 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](#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](#using-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](#using-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](#start-the-stack-with-docker)Visit url http://localhost:8008/