Skip to content

How do I configure environment variables? #556

Closed Answered by TwiN
kuannie1 asked this question in Q&A
Discussion options

You must be logged in to vote

All environment variables work in the configuration file.

I think your problem is that you're not passing the environment variables properly.
You specifically mentioned:

$ <load env vars> docker run -p 8080:8080 --mount type=bind,source="$(pwd)"/config.yaml,target=/config/config.yaml --name gatus twinproduction/gatus

which I assume you meant you did something like

$ CLIENT_ID=... docker run -p 8080:8080 --mount type=bind,source="$(pwd)"/config.yaml,target=/config/config.yaml --name gatus twinproduction/gatus

but that's not how you should pass environment variables using the Docker command line.
Instead, it should be:

$ docker run -e CLIENT_ID=value1 -e CLIENT_SECRET=value2 -p 8080:8080 --…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kuannie1
Comment options

Answer selected by TwiN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants