Skip to content

Commit

Permalink
Add job to generate documentation for Infrahub configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ogenstad committed May 31, 2024
1 parent da7de6b commit 07efa58
Show file tree
Hide file tree
Showing 4 changed files with 910 additions and 95 deletions.
2 changes: 2 additions & 0 deletions backend/infrahub/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ def database_name(self) -> str:


class BrokerSettings(BaseSettings):
"""Configuration settings for the message bus."""

model_config = SettingsConfigDict(env_prefix="INFRAHUB_BROKER_")
enable: bool = True
tls_enabled: bool = Field(default=False, description="Indicates if TLS is enabled for the connection")
Expand Down
43 changes: 43 additions & 0 deletions docs/_templates/infrahub_config.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Infrahub Configuration
---

# Infrahub configuration

The Infrahub containers have a number of environmental variables available at runtime to affect their behavior.

## Usage

Here are a few common methods of setting environmental variables:

- Exporting in a shell, e.g.: `export INFRAHUB_ADDRESS="http://localhost:8000"`
- Using a [`.env` file](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file)
- Using [direnv](https://direnv.net/)

:::note

`infrahubctl` has it's own environmental variables. See the [infrahubctl documentation](../infrahubctl#environment-variables) for more information.

:::


{% for section in sections %}
## Section: {{ section.name }}
Description: {{ section.description }}



{% for parameter in section.parameters %}

### {{ parameter.name }}
Description: {{ parameter.description }}

**Default setting:** {{ parameter.default }}

**Type:** {{ parameter.type }}

**Environment variable:** {{ parameter.env }}

{% endfor %}

{% endfor %}
Loading

0 comments on commit 07efa58

Please sign in to comment.