I need setup QGIS Server + PostGIS (+ Lizmap) in Docker for our GIS users. I spent a lot of time reading documentation and searching for information on that matter but it's unclear for me as for sysadmin. I feel like QGIS server documentation limited on this topic. Could you direct me on right way?
EDIT: I've used Docker based Lizmap project, with my additions in docker-compose file, I've added Postgis and Pgadmin services (containers)
version: '3' services: postgis: # image: "mdillon/postgis" image: "mdillon/postgis:10" container_name: postgis restart: always privileged: true # add for centos7 firewall. volumes: - ./postgis:/var/lib/postgresql/data # default volumn path is /data/postgis. ports: - "9823:5432" # port 5432 of host machine will be listened. environment: - POSTGRES_PASSWORD=************** # default password is "1". - POSTGRES_USER=postgres # default username is "postgres". - PGDATA=/var/lib/postgresql/data # folder in container to store data. - POSTGRES_DB=postgres # default database is "postgres". pgadmin: container_name: pgadmin_container image: dpage/pgadmin4 environment: PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]} PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-************} volumes: - ./pgadmin:/root/.pgadmin ports: - "${PGADMIN_PORT:-5050}:80" restart: unless-stopped lizmap: image: 3liz/lizmap-web-client:3.2 environment: LIZMAP_CACHEREDISDB: '1' LIZMAP_CACHEREDISHOST: redis LIZMAP_CACHESTORAGETYPE: redis LIZMAP_HOME: /srv/lizmap LIZMAP_USER: ${LIZMAP_USER_ID} LIZMAP_WMSSERVERURL: http://map:8080/ows/ volumes: - ${LIZMAP_DIR}/instances:/srv/projects - ${LIZMAP_DIR}/var/lizmap-theme-config:/www/lizmap/var/lizmap-theme-config - ${LIZMAP_DIR}/var/lizmap-config:/www/lizmap/var/config - ${LIZMAP_DIR}/var/lizmap-db:/www/lizmap/var/db - ${LIZMAP_DIR}/www:/www/lizmap/www - ${LIZMAP_DIR}/www/var/log:/www/lizmap/var/log command: - php-fpm restart: unless-stopped map: image: 3liz/qgis-map-server:3.4 environment: PGSERVICEFILE: /srv/etc/pg_service.conf QGSRV_CACHE_ROOTDIR: /srv/projects QGSRV_CACHE_SIZE: '20' QGSRV_LOGGING_LEVEL: DEBUG QGSRV_USER: ${LIZMAP_USER_ID}:${LIZMAP_USER_GID} ROUTER_HOST: map volumes: - ${LIZMAP_DIR}/instances:/srv/projects - ${LIZMAP_DIR}/etc:/srv/etc:ro - ${LIZMAP_DIR}/wps-data:/srv/data restart: unless-stopped redis: image: redis:5 web: image: nginx:1 volumes: - ${LIZMAP_DIR}/etc/nginx.conf:/etc/nginx/nginx.conf - ${LIZMAP_DIR}/var/log/nginx:/var/log/nginx - ${LIZMAP_DIR}:/srv/lizmap ports: - 8888:80 depends_on: - lizmap I'm able now login into lizmap in web browser, but tests projects in *.qgs files don't appears, so my lizmap web page is blank, even I try to change in UI lizmap setting regard to repository and projects. Also I'm able now to connect from Qgis Desktop on my local machine to Postgis database and use Pgadmin webclient to connect to the same Postgis database. Although I'm aware that my Postgis DB doesn't integrate with Qgis server, Lizmap and Nginx webserver. At the moment I think that I need, break down on sub tasks:
- Put test project (map) to my current Postgis DB
- Setup connection Qgis Server with Postgis DB through writing FCGI web config file for web server (in my case Nginx) . So some DB query should be writed in thi config file.
- Setup connection Lizmap web client with Postgis DB
- Probably setup/config XVFB in conjuction with QGIS server (container)