Skip to content

Expand secret environment variables in accessory files #1601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aliismayilov
Copy link
Contributor

When accessory file ends with .erb, it's possible to interpolate environment variables in it. Currently, only clear environment variables are expanded. Not sure if it was a deliberate choice.

This PR includes all env variables (including the aliased ones) in the ERB template processing.

Background: I was trying to run PgBouncer (a PostgreSQL connection pooler) as an accessory, which required the database connection string to be present in its configuration file. I managed to work around this by generating the final config file through a Docker entrypoint script. However, if this PR is accepted, the setup would become much simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant