Go to file Use this template
2024-08-13 13:52:03 +04:00
nginx adding: celery 2024-08-13 00:45:14 +03:00
src updating 2024-08-13 00:55:26 +03:00
.dockerignore feat: pre-commit 2024-08-13 13:45:55 +04:00
.env.example adding: celery 2024-08-13 00:45:14 +03:00
.flake8 feat: pre-commit 2024-08-13 13:45:55 +04:00
.gitignore init 2024-08-12 22:22:51 +03:00
.pre-commit-config.yaml feat: pre-commit 2024-08-13 13:45:55 +04:00
docker-compose.yaml adding: celery 2024-08-13 00:45:14 +03:00
Dockerfile update: dockerfile 2024-08-12 22:27:12 +03:00
README.md merge 2024-08-13 13:52:03 +04:00

simpliest django(uvicorn)+postgresql+fastapi+redis+nginx docker-compose (ready for production and dev)

How to use

To run: docker-compose up -d

Site available on 8000 port.

You can make any changes in code, they will appear automatically. If you want to execute something with manage.py use:

docker-compose exec app python3 manage.py migrate
docker-compose exec app python3 manage.py makemigrations
docker-compose exec app python3 manage.py update_admin admin adminpass # create superuser

and so on.

Example task task_example.py

Example register task init.py

Example send task send_task.py

Install formatting

Features

  • check for unsolved merge conflicts
  • black formatting
  • sort imports
  • remove unused variables, imports, duplicates
  • flake8 verification

It executes on every commit

pip install pre-commit flake8 black
pre-commit install

Apply for all files in current directory:

pre-commit run --all-files

If there is PEP8 errors, commit will be forbidden. To force commit use flag --no-verify:

git commit --no-verify ...