kartoza / docker-qgis-server

A dockerfile that contains a running QGIS server
68 stars 31 forks source link

QGIS server is not working with layers coming from the database #11

Open NyakudyaA opened 6 years ago

NyakudyaA commented 6 years ago

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. get

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.

timlinux commented 6 years ago

Can you test again with the latest QGIS 2.18 and 3 server builds?

NyakudyaA commented 6 years ago

Ok @timlinux will do so. Is there any image for qgis server 3 yet

NyakudyaA commented 6 years ago

Get capabilities working but the wms returns an empty image. Still needs to test further

LoonSongSoftware commented 1 year ago

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)

NyakudyaA commented 1 year ago

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

LoonSongSoftware commented 1 year ago

Thank you. I'll re-post in the main QGIS forum, since I'm not actually using a docker image.