Replies: 1 comment 5 replies
-
Are you unable to use the existing libpq environment variables? IOW, if you have:
You should be able to: env PGHOST=example.com PGPORT=1234 PGPASSWORD=xxx PGUSER=admin PGDATABASE=widges sqitch deploy See the sqitch-environment guide for a complete list of supported environment variables. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
A lot of us are using Docker nowadays and 'the Docker way' is often to use environment variables to communicate information across all the services in your application. Typically I pass database credential stuff like user name, password, host, this way. I think it would be really great if my sqitch.conf file could include target placeholders that would pull their value from %ENV (or die if empty). Right now I end up doing hacks like building the sqitch.conf file from a script or in my Makefile (for example => https://github.com/jjn1056/ContactsDemo/blob/main/Makefile#L39) in order to pull in the environment variables. It would be a lot nicer and place well with modern development workflows (IMHO) if we could have placeholders directly in the configuration files like this:
We could tweak how we detect placeholders to use whatever syntax we think is best compatible with configuration files in the wild.
What do you think? If you like the idea and can settle on a syntax I'd be willing to work on a PR. Alternatively if there's a better way to do that that already exists in the code I'd be happy to take instruction and update my blog examples to match. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions