Getting Up and Running Locally
Getting Up and Running Locally without Docker
- Create a virtualenv:
python3.11 -m venv <virtual env path>or with
virtualenv -p python3.11 <virtual env path>For example, if you would like to create a virtualenv with the name 'venv', change into to directory, and then
python3.11 -m venv venv- Activate the virtualenv you have just created:
source <virtual env path>/bin/activate- Install development requirements:
pip install -r requirements/local.txt- Create a new database
createdb --username=postgres <database_name>- Set the environment variables for your database:
export DATABASE_URL=postgres://postgres:<password>@127.0.0.1:5432/<database_name>(Change the part postgres:< password > according to the username and password in your system)
export CELERY_BROKER_URL=redis://localhost:6379/0- Run this command when not using Docker
export USE_DOCKER=no- Apply migrations:
python manage.py migrate- Run the application
python manage.py runserver 0.0.0.0:8000- For Celery, run
redis-serverthen
celery -A config.celery_app worker --loglevel=info- If you would like to test the emails with Mailhog, you should first download Mailhog and run it. Settings for Mailhog:
export EMAIL_HOST='127.0.0.1'Then you can check the emails on http://127.0.0.1:8025/