PolyData is a modular platform for ingesting, managing, and publishing data built on Django, Wagtail and PygeoAPI. Its architecture combines a Django backend with:
- Wagtail CMS for content and administration
- Catalog API, DRF for tabular data and Pygeoapi for geospatial services on top of Postgres with PostGIS and ParadeDB.
- OpenID Connect authentication (OIDC) using
django-oidc-provider - Internal apps (
account,catalog,ingestion,main) containing business logic - Docker compose ready for production deployment
- OIDC authentication for users and relying-party clients
- REST API with OpenAPI/Swagger (
drf-spectacular) - OGC API service configurable via environment variables
- Data ingestion leveraging PostGIS and GeoAlchemy
- Elastic quality search with ParadeDB
- Flexible configuration through env vars
- Docker Compose orchestration of database and Django server
- Docker & Docker Compose
- (Optional for local tasks) Python 3.14+
- PostgreSQL with PostGIS and ParadeDB extension (provided by the
databasecontainer)
When running through Docker Compose, set the database host to the Compose service name database, not localhost.
-
Clone the repository:
git clone https://github.com/tu-org/PolyData.git cd PolyData -
Copy and edit the environment files:
cp backend/.env.example backend/.env cp frontend/.env.example frontend/.env
-
Bring up the services:
docker-compose up -d --build
This will start the
database(PostGIS and ParadeDB) andbackend(Django/Gunicorn) containers.If you already have a local PostgreSQL volume created with the old
/var/lib/postgresql/datamount layout, do not reuse it directly with PostgreSQL 18+ images. Remove the old development volume if it is disposable, or migrate it withpg_upgradebefore reattaching data. -
Create a Django superuser to access the admin:
docker-compose exec backend uv run src/manage.py createsuperuser -
Visit the key endpoints:
- Django admin:
http://127.0.0.1:8000/admin/ - Wagtail admin:
http://127.0.0.1:8000/cms/(if enabled) - REST API:
http://127.0.0.1:8000/api/ - PygeoAPI:
http://127.0.0.1:8000/geoapi/(configurable viaPYGEOAPI_BASE_PATH) - Swagger/OpenAPI:
http://127.0.0.1:8000/api/schema/swagger-ui/
- Django admin:
Inside the backend container:
docker-compose exec backend bash
# then use manage.py or uv like any Django project
uv run src/manage.py migrate
uv run src/manage.py runserver 0.0.0.0:8000Python dependencies are managed with UV. To add a package:
docker-compose exec backend uv add <package>backend/– main Django applicationaccount/– custom user model and authcatalog/– catalog logic and pygeoapi configurationingestion/– data loading servicesmain/– settings, urls and general views
frontend/– (optional) code for a decoupled clientdocker-compose.yaml– definesdbandbackendservices
POSTGRES_HOST,POSTGRES_PORT,POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORDSECRET_KEY,DEBUG,DJANGO_URL,FRONTEND_URLPYGEOAPI_TABLE,PYGEOAPI_BASE_PATH,PYGEOAPI_TITLE, etc.
See backend/src/main/settings/base.py for the full list with comments.
You can deploy on any container platform. Be sure to:
- Adjust environment variables for production (
DEBUG=false, hosts, etc.). - Use an appropriate WSGI/ASGI backend (Gunicorn is already configured).
- Mount persistent volumes for
dbandbackendif needed.
- Celery task queue for asynchronous processing
- Fine grained permissions and roles
- [] Data versioning and history
- [] More ingestion connectors (CSV, APIs, etc.)
- [] Map creation and publishing tools
- [] DataStories and dashboards
Pull requests are welcome! 🙌
- Fork and branch with a
feature/orfix/prefix. - Add tests and documentation when applicable.
- Open a PR describing your change.
- Respond to feedback and keep commits tidy.
This project is licensed under the GNU Affero General Public License. See the LICENSE file for details.
Thanks for using PolyData! 🌍