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

[DOCS] Updated $BRANCHNAME with actual env variable names $LAGOON_GIT_BRANCH and $LAGOON_GIT_SAFE_BRANCH used in the script. #3196

Merged
merged 1 commit into from
Jun 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/using-lagoon-advanced/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ As there can be environment variables defined in either the Dockerfile or during
1. Environment variables \(defined via Lagoon API\) - environment specific.
2. Environment variables \(defined via Lagoon API\) - project-wide.
3. Environment variables defined in Dockerfile \(`ENV` command\).
4. Environment variables defined in `.lagoon.env.$BRANCHNAME` \(if the file exists and where `$BRANCHNAME` is the branch this Docker image has been built for\), use this for overwriting variables for only specific branches.
4. Environment variables defined in `.lagoon.env.$LAGOON_GIT_BRANCH` or `.lagoon.env.$LAGOON_GIT_SAFE_BRANCH` \(if the file exists and where `$LAGOON_GIT_BRANCH` `$LAGOON_GIT_SAFE_BRANCH` are the name and safe name of the branch this Docker image has been built for\), use this for overwriting variables for only specific branches.
5. Environment variables defined in `.lagoon.env` \(if it exists\), use this for overwriting variables for all branches.
6. Environment variables defined in `.env`.
7. Environment variables defined in `.env.defaults`.

`.lagoon.env.$BRANCHNAME`, `.lagoon.env.$BRANCHNAME`, `.env`, and `.env.defaults` are all sourced by the individual containers themselves as part of running their entrypoint scripts. They are not read by Lagoon, but by the containers `ENTRYPOINT` scripts, which look for them in the containers working directory. If environment variables don't appear as expected, check if your container has a `WORKDIR` setting that points to somewhere else.
`.lagoon.env.$LAGOON_GIT_BRANCH`, `.lagoon.env.$LAGOON_GIT_SAFE_BRANCH`, `.env`, and `.env.defaults` are all sourced by the individual containers themselves as part of running their entrypoint scripts. They are not read by Lagoon, but by the containers `ENTRYPOINT` scripts, which look for them in the containers working directory. If environment variables don't appear as expected, check if your container has a `WORKDIR` setting that points to somewhere else.

## Environment Variables \(Lagoon API\)

Expand Down