Getting started
Local setup¶
This assumes you will use the docker compose file in this repo to run services. If that is not the case you may need to edit some settings.
Python environment¶
Install uv to manage Python versions and dependencies:
Create a virtual environment in .venv and install the requirements:
Activate it (or prefix commands with uv run):
Install the git hooks and run them once:
Create your env file and edit the settings as needed (or export settings directly):
GeoDjango / PostGIS¶
Connect uses GeoDjango and PostGIS. To learn more about the required dependencies, see the Django documentation.
For macOS (Intel / Apple Silicon) – using Homebrew:
Django may struggle to find the GDAL and GEOS libraries even after they are installed. Get your local library paths:
Then set them in your .env file:
Install WeasyPrint:
For Ubuntu / Debian Linux:
Enabling the PostGIS extension
No migration creates the postgis extension. The inv up setup works because the postgis/postgis image
enables it for you when it initialises the database.
If you are using your own PostgreSQL instead, create the extension in the target database before migrating, or the first spatial migration will fail:
Running the app¶
Start the docker services (PostgreSQL/PostGIS and Redis):
Install the JS dependencies and build them (add -w to rebuild on changes):
Migrate the database and start Django: