Skip to content
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

Read env value from ENV_DIR instead of env directly #3

Closed
wants to merge 1 commit into from

Conversation

gerynugrh
Copy link

From the API Documentation, during compile phase, build pack should have read env value from $ENV_DIR, e.g. $ENV_DIR/GOOGLE_CREDENTIALS.

This commit changes the workflow of the build pack to match API Documentation.

@elishaterada
Copy link
Owner

@dmathieu looping you in on this one

@dmathieu
Copy link
Contributor

We don't want to read environment variables at build time. We want to read it at boot time.
So the content of the .sh script should be echo ${CREDENTIALS@Q} > /app/google-credentials.json, with the variable name used, not its value.

Your change would store the value at build time. So changing the config variables would require a new build.

@gerynugrh gerynugrh closed this Oct 30, 2019
@sineraves
Copy link

Both approaches are reading the environment variable at compile time. To read the current value of $GOOGLE_CREDENTIALS during startup, it needs to be escaped when writing the profile.d script. Please see #5

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.

4 participants