jancelin / docker-lizmap

docker lizmap
GNU Affero General Public License v3.0
27 stars 21 forks source link

Connect to PostGIS DB from outside #56

Open hoge6b01 opened 6 years ago

hoge6b01 commented 6 years ago

Hi, I've got another question: is it possible to connect to the postgis DB from outside? I deploy the docker-lizmap on a server and want to connect to the DB from my local QGIS. Would that be possible?

quentin-fractale commented 5 years ago

Hi, You can open your PostreSQL by editing the configuration. Here is a link about the subject: https://stackoverflow.com/questions/18580066/how-to-allow-remote-access-to-postgresql-database/18580598#18580598

you could also do it with a SSH tunnel. You redirect your connection throw the ssh tunnel then connect to the postgresql database with the localhost.

Here is a resource https://tripgis.wordpress.com/2015/02/19/creating-a-remote-postgis-backend-to-use-with-qgis/

It works pretty well but it's slow on large databases.