Closed olivierdalang closed 3 years ago
@olivierdalang actually there is an easy workaround, could you test and if it works add it to the documentation?
you need to mount the file to the default pg_service location
-v ./myconf/pg_service.conf:/etc/postgresql-common/pg_service.conf:ro
Hi !
Using pgservice.conf is good practice, as it avoids having to hardcode the postgres connection info in the project file, making the project file much more portable (you can use the same locally and in the server, and distribute it without leaking postgres passwords).
Unfortunately, it seems it's not supported with this image.
Mounting the file under
/var/lib/qgis/.pgservice.conf
(or somewhere else by specifying thePGSERVICEFILE
env var) as per postgres's docs does not work with following error :To make it work, one has to add a line like
fastcgi_param PGSERVICEFILE /io/.pg_service.conf;
next to https://github.com/gem/oq-qgis-server/blob/master/conf/qgis-server-nginx.conf#L98, which is annoying as it requires overwriting the whole config file.Thanks for this otherwise great image !