-
|
I keep struggling with environment variable configuration. I have this security section defined: I've tried setting these environment variables explicitly, but I consistently get this error: When I copy paste these values in the config.yaml file, it works. Do Environment variables only work for PORT and DOMAIN? Or is this a feature that needs to get implemented? All of the other issues & PRs assume that Environment Variables were set already. I've tried ${ENV} and $ENV, but that doesn't help. I run gatus with this command: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
All environment variables work in the configuration file. I think your problem is that you're not passing the environment variables properly. $ <load env vars> docker run -p 8080:8080 --mount type=bind,source="$(pwd)"/config.yaml,target=/config/config.yaml --name gatus twinproduction/gatuswhich 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/gatusbut that's not how you should pass environment variables using the Docker command line. $ docker run -e CLIENT_ID=value1 -e CLIENT_SECRET=value2 -p 8080:8080 --mount type=bind,source="$(pwd)"/config.yaml,target=/config/config.yaml --name gatus twinproduction/gatus |
Beta Was this translation helpful? Give feedback.
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/gatuswhich 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/gatusbut 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 --…