mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-14 11:58:04 +00:00
docs: demonstrate use of environment variables in config (#571)
* docs: demonstrate use of environment variables in config * chore: reorder env vars to match order used in DB connection
This commit is contained in:
parent
4dea597726
commit
aa7f8131cd
3 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
storage:
|
storage:
|
||||||
type: postgres
|
type: postgres
|
||||||
path: "postgres://username:password@postgres:5432/gatus?sslmode=disable"
|
path: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
|
||||||
|
|
||||||
endpoints:
|
endpoints:
|
||||||
- name: back-end
|
- name: back-end
|
||||||
|
|
|
@ -18,6 +18,10 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=username
|
||||||
|
- POSTGRES_PASSWORD=password
|
||||||
|
- POSTGRES_DB=gatus
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/config
|
- ./config:/config
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -191,6 +191,8 @@ subdirectories are merged like so:
|
||||||
- To clarify, this also means that you could not define `alerting.slack.webhook-url` in two files with different values. All files are merged into one before they are processed. This is by design.
|
- To clarify, this also means that you could not define `alerting.slack.webhook-url` in two files with different values. All files are merged into one before they are processed. This is by design.
|
||||||
|
|
||||||
> 💡 You can also use environment variables in the configuration file (e.g. `$DOMAIN`, `${DOMAIN}`)
|
> 💡 You can also use environment variables in the configuration file (e.g. `$DOMAIN`, `${DOMAIN}`)
|
||||||
|
>
|
||||||
|
> See [examples/docker-compose-postgres-storage/config/config.yaml](.examples/docker-compose-postgres-storage/config/config.yaml) for an example.
|
||||||
|
|
||||||
If you want to test it locally, see [Docker](#docker).
|
If you want to test it locally, see [Docker](#docker).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue