This Docker image builds upon the Camptocamp QGIS Server Docker image. It adds a simple way to access QGIS projects stored in a PostgreSQL database.
It is required to mount a pg_service file to the container provide the environment variable PG_SERVICE_NAME
.
Example compose file:
services:
qgis-server:
image: ghcr.io/siticom/docker-qgis-server-postgres
environment:
- PG_SERVICE_NAME=my_service_name
- QGIS_SERVER_PROJECT_CACHE_STRATEGY=periodic
- PGSERVICEFILE=/home/pg_service.conf
volumes:
- ./pg_service.conf:/home/pg_service.conf
ports:
- "8083:80"
A QGIS project in Postgres can be accessed with this URL:
http://localhost:8083/ows/my_schema/my_qgis_project_name/?SERVICE=WMS&REQUEST=GetCapabilities