docker-qgis-server
docker-qgis-server copied to clipboard
QGIS server is not working with layers coming from the database
Problem
I have my compose file setup
postgres:
image: kartoza/postgis:9.5-2.2
ports:
- "35432:5432"
environment:
- USERNAME=docker
- PASS=docker
qgisserver:
image: kartoza/qgis-server:2.18.10
hostname: qgis-server
volumes:
- ./web:/web
environment:
- QGIS_PROJECT_FILE=/web/project/project.qgs
- PGSERVICEFILE=/web/project/pg_service.conf
links:
- postgres:postgres
ports:
- "30003:80"
When I log into the qgis-server container I can connect to the Postgres container by using the service file. psql service=gis
but when I do a get capabilities on my layer the request generated is not valid.
I then proceed to open the project file and replace my data source with a shapefile and do a get capabilities which returns true.
I think QGIS server is not connecting properly to the Postgres container.
Can you test again with the latest QGIS 2.18 and 3 server builds?
Ok @timlinux will do so. Is there any image for qgis server 3 yet
Get capabilities working but the wms returns an empty image. Still needs to test further
Was this ever addressed? I'm having the same issue (server properly serves a layer if it's stored in a .gpkg file, but not if the same data is read from a database (MySQL in my case)). Both versions (.gpkg and database) work in QGIS client. I'm just working with the "places" layer (country capital cities) from the QGIS server example suite.
Server version: 3.26.3 (running on Ubuntu Focal) Client version: 3.26.2 (running on Windows)
This repo is no longer maintained, Please use other alternative images i.e https://hub.docker.com/r/3liz/qgis-map-server, https://github.com/gem/oq-qgis-server
Thank you. I'll re-post in the main QGIS forum, since I'm not actually using a docker image.