Read this in other languages: English, Español.
I have done this project to save the initial work hours that a typical django project requires.
It is designed to be dockerized and it is very important that you load the environment variables according to your need
- Rest API with auto-generated documentation using swagger
- Coroutines using Celery and Redis
- Uvicorn is used to be able to use asynchronous views
- It is ready to work with database replicas
- By default it is configured to use PostgreSQL
- For development use WhiteNoise, for production it is recommended that you use a CDN
- sh scripts/pre-commit.sh
- docker-compose build
- docker-compose up django
- (in another terminal) docker-compose exec django bash
- python manage.py migrate
- python manage.py createsuperuser
- docker-compose stop
- docker-compose up django beat worker flower (remember to restart beat and worker when creating new celery tasks, they do not restart automatically)
- export COMPOSE_FILE=prod/docker-compose.yml
- docker-compose build
- docker tag codebase_django: latest < name of the registry where you want to upload >
- docker push < name of the registry where you want to upload >