-
Follow PEP8 for Python code.
-
Try to keep line width under 120 characters.
-
Use formatted string literals for string formatting.
-
Use Type Hints whenever possible.
-
For docstrings in everything but views use google style docstring.
-
Code for the API endpoints should be places in
api
folder, except of thesearch
endpoint. -
Names, variables, docstring, comments, etc. should be written in english.
-
Test files should be placed in
tests
dir in directory where tested file is.
There is a Makefile with following commands:
build-all
- Build all containers, dev-build by default:build-redis
build-postgres
build-django
build-nginx
build-rabbitmq
build-celery
rebuild-all
- Remove all containers and volumes and rebuilds them:rebuild-redis
rebuild-postgres
rebuild-django
rebuild-nginx
rebuild-rabbitmq
rebuild-celery
run-dev
- Run containers in development moderun-dev-no-logs
- Run containers in development mode without output to the consolemigrate
- Run migrations in flask containerstop
- Stop all containers:stop-redis
stop-postgres
stop-django
stop-nginx
stop-rabbitmq
stop-celery
rm
- Remove all containers:rm-redis
rm-postgres
rm-django
rm-nginx
rm-rabbitmq
rm-celery
rm-all-volumes
- Remove all volumes:rm-db-volume
rm-nginx-volume
clean-all
- Stop and remove all containers and volumes:clean-redis
clean-postgres
clean-django
clean-nginx
clean-rabbitmq
clean-celery
shell-redis
- Open Bash shell in redis containershell-postgres
- Open Bash shell in postgres containershell-django
- Open Bash shell in django containershell-nginx
- Open Bash shell in nginx containershell-celery
- Open Bash shell in celery containerlogs
- Output all logs to the terminal:logs-redis
logs-postgres
logs-django
logs-nginx
logs-rabbitmq
logs-celery
dev-reload
- Watch files for changes and reloads services when needed.reload-nginx
- Reload nginxprepare-tests
- Start containers in test modetest
- Run tests inside containers.