mapnik / mapnik-support

Use the issues queue here to ask questions and offer help on using Mapnik (maybe if this works well we can retire the mailing list at http://mapnik.org/contact/?)
6 stars 6 forks source link

dynamic datasource #53

Closed xmcax closed 8 years ago

xmcax commented 8 years ago

How can I provide psql datasource in datasource-settings.xml.inc dynamically?

What I'm trying to achieve is to create a database and mapnik in a separate docker containers. To make it work I need to be able to provide the db: host, port, dbname & user using env variable.

springmeyer commented 8 years ago

@xmcax - the easiest solution is to just remove all those variables from the XML. Then they will be picked up from the environment if you set in them correctly for libpq: http://www.postgresql.org/docs/9.3/static/libpq-envars.html

xmcax commented 8 years ago

Works like a charm, thanks:)