-
Backend part of the application working with users and functionality of comments, chats
-
I have described in detail how to use the APIs of this project in the Postman documentation :
-
Also in the image on my Docker Hub is always the latest version of the code using the GitHub CD :
-
This project is written in the latest version of Python 3.11 along with the Django framework
-
All code is written in OOP
-
NoSQL database MongoDB is connected via official images
- Django ORM was used to work with the database
- Django ORM was used to work with the database
-
WebSocket chat functionality is connected, i.e. Django Channels
-
Implemented queue functionality using Celery and RabbitMQ message broker
-
Caching is used in some cases
-
The JWT token is used to authenticate the user
-
Just a few steps are enough to do:
-
Copy the already prepared file docker-compose.yml to the folder
-
At the level of this file, create an .env file where you write the following variables:
-
Write a SECRET_KEY variable for the JWT token ( it can be a random value )
-
MONGO_INITDB_ROOT_USERNAME
-
MONGO_INITDB_ROOT_PASSWORD
-
MONGO_DB_AUTH_SOURCE ( for this variable usually 'admin' value is used)
-
ME_CONFIG_MONGODB_ADMINUSERNAME ( use the same data as for image mongo )
-
ME_CONFIG_MONGODB_ADMINPASSWORD ( use the same data as for image mongo )
-
ME_CONFIG_MONGODB_SERVER=mongo
-
-
After installing the environment, we run:
docker-compose up -d
-
After successful launch in our project folder should be created 2 folders:
-
mongodb_data
-
rabbitmq_data
-
-
It means that all started well
-
And the last step is to apply the migrations in the container:
docker exec -it backend bash
python src/manage.py migrate
-
-
Now the backend part is ready to be used)