systemapic / pile

PostGIS tile server
0 stars 2 forks source link

PostGIS access is not being read from env.sh #9

Closed strk closed 8 years ago

strk commented 8 years ago

I don't see pile getting user/password from environment variables in config. Shouldn't it ? https://github.com/systemapic/pile/blob/master/src/pile.js#L1352-L1358

strk commented 8 years ago

got it, I also see a todo: put in config for the "conString", there there are currently at least 2 different places in which postgresl configuration is hard-coded

strk commented 8 years ago

For a start, the connection configuration should be in pile-config.js

knutole commented 8 years ago

I think PostGIS configuration should stay in one place, and once place only. If not, when changing config params, we need to update them in several places.

Currently this place is env.sh (which could be renamed to postgis.env). Fix would be to have pile read this ENV, thus: https://nodejs.org/api/process.html#process_process_env. env.sh could be sourced in pile-server.sh.

knutole commented 8 years ago

TODO: check postgres trust settings.

strk commented 8 years ago

For deploy I agree config should be in one place, but each component should also do its centralization. For example, having it in "pile" config and have "pile" config read from env, or allow env override. Anyway, can be incremental. I'll make a first pass.

strk commented 8 years ago

The problem persists as of baa7edc90e06054e1fe21ee6ed21e1606c161377

The problem is that sourcing env.sh is not enough to export those variables in the environment (well, at least one problem). I'll find a solution.