gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.53k stars 818 forks source link

exposing port 5432 in docker #3128

Closed james2432 closed 6 years ago

james2432 commented 6 years ago

Would there be any opposition to me exposing the 5432 port for the database in the docker config or is this a security reason?

It simplifies connecting to the database with local tools such as pgadmin and not have to run queries through the ugly cli

kocio-pl commented 6 years ago

You can always do it by adding a proper line into docker-compose.yml. The question is if we want this port to be visible by default? I guess not, because if somebody uses standard PostgreSQL port in her system, this would mean conflict - two apps/instances can't use the same port at the same time.

james2432 commented 6 years ago

We could also bind it to a higher port by saying: "5432:6666" as long as it's <65535 and >1024

james2432 commented 6 years ago

We could also make it as a comment to help new comers not have to read docker documentation to get started

kocio-pl commented 6 years ago

Well, we could do that, but I don't see the generic need to export the database ports, it's rather quite specific. Why do you need to make direct database queries, by the way?

james2432 commented 6 years ago

to test that queries are working before adding them to the project.mml instead of testing them via kosmtik. If they were atleast commented out it would help new people know where to allow connections to PGsql. If an icon doesnt show up it's easy to debug if it's your sql or your CSS selectors where the bug is

kocio-pl commented 6 years ago

Well, you don't need that - just turn on the Kosmtik "Data inspector" tool (you can even select some layers) and you will see which data associated with the objects are selected - look here on top:

https://github.com/kosmtik/kosmtik#screenshot

kocio-pl commented 6 years ago

I think this is both too specialized and not needed by default to test data, so I'm closing it.