Closed strk closed 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
For a start, the connection configuration should be in pile-config.js
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
.
TODO: check postgres trust
settings.
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.
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.
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