WARNING! DO NOT USE THIS DEPLOYMENT IN A PRODUCTION ENVIRONMENT!
This document describes installation steps required to install locally for development.
- Install node (>=20)
- Install python and python-dev (>=3.12)
- Install and start postgresql (>=15)
- Install and start redis (>=7)
- Create a postgresql database and user:
sudo -u postgres createuser -Pds contactdb && sudo -u postgres createdb contactdb
- (Recommended) create and activate a python virtualenv
- Clone this repository
- Configure local settings, starting from the dev example; ensure that the DB connection details are correctly set
cp .env.develop.example .env
- Install dependencies
pip install -c requirements/constraints.txt -r requirements/dev.txt npm install
- Run migrations
./manage.py migrate
- Add some testing data to the DB:
./manage.py seed_db
- Start the backend with hot-reload
./manage.py runserver
- (optional) Start worker. NOTE Worker does not have hot-reload, changes to the code will require a restart
./manage.py rqworker
- Check backend is running correctly at http://localhost:8000 and login with credentials created with seed_db:
- [email protected] / admin
- Update the code with the latest version
- Update third-party packages required at runtime.
pip install -c requirements/constraints.txt -r requirements/dev.txt
- Run migrations:
./manage.py migrate
- Copy the env file
cp .env.develop.docker.example .env
- Copy the compose ovveride file to create an override
cp compose.override.local-build.yml compose.override.yml
- Build and start the containers
docker compose build docker compose up -d
- Create superuser
docker compose exec app ./manage.py createsuperuser
See the tests guide to run the test suites locally. Afterward check the development guide to help you get started.