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.

VariableRequiredDescription
GITDB_REPOSITORY_URLYesHTTPS or SSH URL of the GitDB repository.
GITDB_BRANCHYesBranch containing the GitDB data.
GITDB_ENCRYPTION_KEYYesSecret key used to encrypt GitDB data. Store it securely and keep it stable.
GITDB_DATA_PATHYesContainer path where the local GitDB checkout is stored, for example ./data/gitdb.
GITDB_USERNAMEYesUsername required by the selected Git provider.
GITDB_TOKENYesRepository access token with read and write permission. See the token instructions.

Notification variables

These variables configure SMTP notifications.

VariableRequiredDescription
NOTIFICATION_SMTP_HOSTNoSMTP server hostname.
NOTIFICATION_SMTP_PORTNoSMTP server port, for example 465.
NOTIFICATION_SMTP_USERNoSMTP username.
NOTIFICATION_SMTP_PASSWORDNoSMTP password or provider API credential.
NOTIFICATION_SMTP_SECURENoUse a secure SMTP connection, for example true.
NOTIFICATION_SMTP_FROMNoSender email address.
NOTIFICATION_SMTP_FROM_NAMENoSender display name.
NOTIFICATION_SMTP_REJECT_UNAUTHORIZEDNoReject 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