Configuration
GitOps is configured through environment variables passed to the Docker container. Keep credentials in a secret manager or an ignored .env file; never commit them to a repository.
GitDB variables
These variables configure the Git repository used as GitDB storage.
| Variable | Required | Description |
|---|---|---|
GITDB_REPOSITORY_URL | Yes | HTTPS or SSH URL of the GitDB repository. |
GITDB_BRANCH | Yes | Branch containing the GitDB data. |
GITDB_ENCRYPTION_KEY | Yes | Secret key used to encrypt GitDB data. Store it securely and keep it stable. |
GITDB_DATA_PATH | Yes | Container path where the local GitDB checkout is stored, for example ./data/gitdb. |
GITDB_USERNAME | Yes | Username required by the selected Git provider. |
GITDB_TOKEN | Yes | Repository access token with read and write permission. See the token instructions. |
Notification variables
These variables configure SMTP notifications.
| Variable | Required | Description |
|---|---|---|
NOTIFICATION_SMTP_HOST | No | SMTP server hostname. |
NOTIFICATION_SMTP_PORT | No | SMTP server port, for example 465. |
NOTIFICATION_SMTP_USER | No | SMTP username. |
NOTIFICATION_SMTP_PASSWORD | No | SMTP password or provider API credential. |
NOTIFICATION_SMTP_SECURE | No | Use a secure SMTP connection, for example true. |
NOTIFICATION_SMTP_FROM | No | Sender email address. |
NOTIFICATION_SMTP_FROM_NAME | No | Sender display name. |
NOTIFICATION_SMTP_REJECT_UNAUTHORIZED | No | Reject invalid TLS certificates, for example true. |
Example env file
Use placeholders for secrets and replace them locally:
GITDB_REPOSITORY_URL=https://github.com/your-org/your-gitdb-repository.git
GITDB_BRANCH=main
GITDB_ENCRYPTION_KEY=replace-with-a-long-random-secret
GITDB_DATA_PATH=./data/gitdb
GITDB_USERNAME=x-access-token
GITDB_TOKEN=replace-with-your-repository-token
NOTIFICATION_SMTP_HOST=smtp.example.com
NOTIFICATION_SMTP_PORT=465
NOTIFICATION_SMTP_USER=replace-with-smtp-user
NOTIFICATION_SMTP_PASSWORD=replace-with-smtp-password
NOTIFICATION_SMTP_SECURE=true
NOTIFICATION_SMTP_FROM=no-reply@example.com
NOTIFICATION_SMTP_FROM_NAME=GitOps
NOTIFICATION_SMTP_REJECT_UNAUTHORIZED=true