This is the simplest configuration for developers to start with.
- Run
docker compose run --rm django ./manage.py migrate
- Run
docker compose run --rm django ./manage.py createsuperuser
and follow the prompts to create your own user
- Run
docker compose up
- Access the site, starting at http://localhost:8000/admin/
- When finished, use
Ctrl+C
Occasionally, new package dependencies or schema changes will necessitate maintenance. To non-destructively update your development stack at any time:
- Run
docker compose pull
- Run
docker compose build --pull --no-cache
- Run
docker compose run --rm django ./manage.py migrate
This configuration still uses Docker to run attached services in the background, but allows developers to run Python code on their native system.
- Run
docker compose -f ./docker-compose.yml up -d
- Install Python 3.13
- Create and activate a new Python virtualenv
- Run
pip install -e .[dev]
- Run
source ./dev/export-env.sh
- Run
./manage.py migrate
- Run
./manage.py createsuperuser
and follow the prompts to create your own user
- Ensure
docker compose -f ./docker-compose.yml up -d
is still active - Run:
source ./dev/export-env.sh
./manage.py runserver
- Run in a separate terminal:
source ./dev/export-env.sh
celery --app resonant_geo_cookiecutter.celery worker --loglevel INFO --without-heartbeat
- When finished, run
docker compose stop
- To destroy the stack and start fresh, run
docker compose down -v
tox is used to execute all tests.
tox is installed automatically with the dev
package extra.
When running the "Develop with Docker" configuration, all tox commands must be run as
docker compose run --rm django tox
; extra arguments may also be appended to this form.
Run tox
to launch the full test suite.
Individual test environments may be selectively run. This also allows additional options to be be added. Useful sub-commands include:
tox -e lint
: Run only the style checkstox -e type
: Run only the type checkstox -e test
: Run only the pytest-driven tests
To automatically reformat all code to comply with
some (but not all) of the style checks, run tox -e format
.