- create virtualenv & install requirements
pyenv virtualenv 3.9.1 blabla_bot
pyenv activate blabla_bot
pip install -U pip poetry
poetry install
pre-commit install
- create DB in Postgres
- add envs from .env.dev
- apply DB migrations
./manage.py migrate
- create super user
./manage.py create_super_user
- runserver
./manage.py runserver
- open localhost:8000/admin/sup-sec/ and login with created user credentials
- runserver
./manage.py run_bot
- call
make pre-commit
before a new commit
To running tests deploy the project according to point above and add to envs ROLE=tests
openssl req -newkey rsa:2048 -sha256 -nodes -keyout .docker/nginx/ssl/cert.key -x509 -days 3650 -out .docker/nginx/ssl/cert.pem -subj "/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=bot.${DOMAIN}"
Put SSL cert to .docker/nginx/ssl/private.key & .docker/nginx/ssl/certificate.crt .