Skip to content
Open
Changes from 3 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
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,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 @@ -221,6 +222,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 @@ -234,14 +238,10 @@ 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 `$$`.

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

> 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.

## Configuration
| Parameter | Description | Default |
|:-----------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|:---------------------------|
| `metrics` | Whether to expose metrics at `/metrics`. | `false` |
Expand Down Expand Up @@ -3284,12 +3284,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 $$ Gatus Monitoring # With env var set to "Example" this will expand to "Example $ Gatus Monitoring"
```
⚠️ 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