Skip to content
Open
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
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga
- [How do I sort by group by default?](#how-do-i-sort-by-group-by-default)
- [Exposing Gatus on a custom path](#exposing-gatus-on-a-custom-path)
- [Exposing Gatus on a custom port](#exposing-gatus-on-a-custom-port)
- [Use environment variables in config files](#use-environment-variables-in-config-files)
- [Configuring a startup delay](#configuring-a-startup-delay)
- [Keeping your configuration small](#keeping-your-configuration-small)
- [Proxy client configuration](#proxy-client-configuration)
Expand Down Expand Up @@ -223,6 +224,9 @@ This example would look similar to this:

![Simple example](.github/assets/example.jpg)

If you want to test it locally, see [Docker](#docker).

## Configuration
By default, the configuration file is expected to be at `config/config.yaml`.

You can specify a custom path by setting the `GATUS_CONFIG_PATH` environment variable.
Expand All @@ -236,9 +240,9 @@ subdirectories are merged like so:

> 💡 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.
> ⚠️ When your configuration parameter contains a `$` symbol, you have to escape `$` with `$$`.
>
> When your configuration parameter contains a `$` symbol, you have to escape `$` with `$$`.
> See [Use environment variables in config files](#use-environment-variables-in-config-files) or [examples/docker-compose-postgres-storage/config/config.yaml](.examples/docker-compose-postgres-storage/config/config.yaml) for examples.

If you want to test it locally, see [Docker](#docker).

Expand Down Expand Up @@ -3299,12 +3303,19 @@ web:
```

If you're using a PaaS like Heroku that doesn't let you set a custom port and exposes it through an environment
variable instead, you can use that environment variable directly in the configuration file:
variable instead see [Use environment variables in config files](#use-environment-variables-in-config-files).

### Use environment variables in config files

You can use environment variables directly in the configuration file which will be substituted from the environment:
```yaml
web:
port: ${PORT}
```

ui:
title: $TITLE
```
⚠️ When your configuration parameter contains a `$` symbol, you have to escape `$` with `$$`.

### Configuring a startup delay
If, for any reason, you need Gatus to wait for a given amount of time before monitoring the endpoints on application start, you can use the `GATUS_DELAY_START_SECONDS` environment variable to make Gatus sleep on startup.
Expand Down