Environment Variables

When deploying Garnet, a set of environment variables are provided which can be used to configure your Garnet instance. The table below details all of them. However, for general use, you most likely do not have to worry about the vast majority of these. You can set these environment variables in your docker-compose.yml, configmap.yml, or Garnet Cloud (recommended). These can also be supplied in a .env file for local testing, however, it is not recommended as a practice.

Variable

Description

Default Value

DB_USERNAME

Database username

postgres if Garnet is running in DEBUG or TEST mode. Must be specified when DATABASE_HOST is not set.

DB_TYPE

Database dialect (for Sequelize)

postgres

DB_PASSWORD

Database password

"" if Garnet is running in DEBUG or TEST mode. Must be specified when DATABASE_HOST is not set.

DB_NAME

Database name

development if Garnet is running in DEBUG or TEST mode. Must be specified when DATABASE_HOST is not set.

DB_HOST

Host pointing to your PostgreSQL instance

localhost if Garnet is running in DEBUG or TEST mode, must be specified otherwise. For the provided docker compose manifests, this value is db

DB_LOGGING

Enable/Disable logging for the database

true

API_DOCUMENTATION_ENABLED

Enable/Disable Swagger UI API Documentation

true

TENANT_MODE

Enable single or multi-tenancy

multi

ENCRYPTION_KEY

Encryption key for secrets in Garnet

256-bit encryption key must be generated by the user (instructions)

AUTH_JWT_SECRET

Secret used to sign the JWT (Authentication) tokens. Random UUID chain

A long randomly generated UUID can be used here e.g.a40a8850-24b2-4023-85ce-1765d10c849b-758df0c2-b112-4851-960d-1b7163d3ccd6

AUTH_JWT_EXPIRES_IN

Determines the validity period for the JWT (Auth) token (in days)

365 days

FRONTEND_URL

URL for the Garnet frontend app

http://localhost:3000

BACKEND_URL

URL for the Garnet backend server

http://localhost:8080

AUTH_SOCIAL_GITHUB_CLIENT_ID

GitHub key for enabling sign up with GitHub.

AUTH_SOCIAL_GITHUB_CLIENT_SECRET

GitHub key for enabling sign up with GitHub.

AUTH_SOCIAL_GITHUB_CALLBACK_URL

GitHub key for enabling sign up with GitHub.

http://localhost:8080/api/auth/social/github/callback for local dev and testing, and https://<your-domain-name-OR-instance-ip>/api/auth/social/github/callback otherwise.

SENDGRID_EMAIL_FROM

Optional Sendgrid email sender. Please see configuring email for details.

""

SENDGRID_KEY

Optional Sendgrid API key. Please see configuring email for details.

""

SENDGRID_TEMPLATE_EMAIL_ADDRESS_VERIFICATION

Optional Please see configuring email for details.

""

SENDGRID_TEMPLATE_INVITATION

Optional Please see configuring email for details.

""

SENDGRID_TEMPLATE_PASSWORD_RESET

Optional Please see configuring email for details.

""

FILE_STORAGE_PROVIDER

Optional File storage provider (aws, gcp, or localhost)

""

FILE_STORAGE_BUCKET

Optional Name of the storage bucket (ifFILE_STORAGE_PROVIDER is configured)

""

GOOGLE_CLOUD_PLATFORM_CREDENTIALS

Optional Only needed if using gcp as the File storage provider

""

AWS_ACCESS_KEY_ID

Optional Only needed if using aws as the File storage provider

""

AWS_SECRET_ACCESS_KEY

Optional Only needed if using aws as the File storage provider

""