[qgis-qwc2] Postgresql Project only from Database

Joerg Thaemert j.thaemert at 1-family.org
Mon Apr 26 04:09:36 PDT 2021


Hi QWC2 Fan's
i have set up the following construct in docker:
https://github.com/qwc-services/qwc-docker (https://github.com/qwc-services/qwc-docker)
Everything works perfectly, as described there.

Then I saved my entire project including layers in the Postgesql database.
On the server side (Q-GIS server with qwc2 client) I still load project.qgs files. I get the layers in the files from the database in the following form:
<layer-tree-layer patch_size="-1,-1" source="service='qwc_geodb' key='id_0' srid=3857 type=MultiLineString checkPrimaryKeyUnicity='1'
table="qwc_geodb"."Fliessgewaesser der IG" (geom)" providerKey="postgres" id="Fliessgewaesser_der_IG_dbe60df6_d1db_4dbd_9fe6_d7523eaf6f50"
legend_split_behavior="0" legend_exp="" expanded="1" name="Fliessgewaesser der IG" checked="Qt::Checked">

I had to edit the qgs project file and change the direct database access (with password dbname and port) and basically access:
source = "service = 'qwc_geodb' to where my layers are stored in the database. That works fine :-)

Unfortunately I am not able to load the whole project from the database and do without the project (qgs) file completely.
I think I have to teach this to my web client (qwc2 is used) somehow. Basically, my most important configuration files are:

https://github.com/qwc-services/qwc-docker/blob/master/api-gateway/nginx.conf (https://github.com/qwc-services/qwc-docker/blob/master/api-gateway/nginx.conf) (api-gateway nginx)
https://github.com/qwc-services/qwc-docker/blob/master/pg_service.conf (https://github.com/qwc-services/qwc-docker/blob/master/pg_service.conf) (DB-Services
https://github.com/qwc-services/qwc-docker/blob/master/qgis-server/qgis3-server.conf (https://github.com/qwc-services/qwc-docker/blob/master/qgis-server/qgis3-server.conf)
https://github.com/qwc-services/qwc-docker/blob/master/volumes/qwc2/config.json (https://github.com/qwc-services/qwc-docker/blob/master/volumes/qwc2/config.json) (QWC2 Webclient)
https://github.com/qwc-services/qwc-docker/blob/master/volumes/qgs-resources/qwc_demo.qgs (https://github.com/qwc-services/qwc-docker/blob/master/volumes/qgs-resources/qwc_demo.qgs) (Project files that I want to do without)
https://github.com/qwc-services/qwc-docker/blob/master/volumes/config-in/default/tenantConfig.json (https://github.com/qwc-services/qwc-docker/blob/master/volumes/config-in/default/tenantConfig.json) (default client configuration from which the various configuration files for QWC2 are generated)
Has anyone already gained experience with this construct and can read various projects directly from the database?
Greetings Jörg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-qwc2/attachments/20210426/fb54a648/attachment.html>


More information about the qgis-qwc2 mailing list