Configuration

Grappa is configured exclusively through environment variables.

Setting name Description Required Values

DEBUG

Set the platform in production or development mode. It is insecure to run a public instance in development mode.

✅

true or false

DATABASE_URL

Credentials to connect to the PostgreSQL database.

✅

postgres://user:password@host:port/dbname

SECRET_KEY

Random string used to build securely authentication cookies. Must be unique per instance.

✅

randomString1234

ALLOWED_HOSTS

List of public hostnames where HTTP requests come from. Any request received from an hostname not listed here will be rejected. When using multiple values, use a comma to separate them.

✅

grappa.company.com

CORS_ALLOWED_ORIGINS

List of public hostnames where Javascript requests come from. Beware this list must have http(s) scheme before the hostname. When using multiple values, use a comma to separate them.

✅

https://grappa.company.com

CSRF_TRUSTED_ORIGINS

List of public hostnames where form publication requests come from. Beware this list must have http(s) scheme before the hostname. When using multiple values, use a comma to separate them.

✅

https://grappa.company.com

REDIS_URL

URL used to reach the Redis server for asynchronous tasks.

✅

redis://host:port/dbname

INSTANCE_URL

Public hostname used to host the instance. It is mainly used to build urls in emails.

✅

grappa.company.com

EMAIL_URL

Credentials to send emails with the application. An SMTP email account is required to send grappa emails such as "Forget password", etc.

smtp://user:password@host:port

DEFAULT_FROM_EMAIL

The email address which will be used to send the emails.

noreply-grappa@company.com

SENTRY_DSN

Sentry private DSN used to publish Python exceptions.

https://sentry.io/...

CACHE_URL

Cache to be used by grappa. We recommend to use Redis cache for production as in-memory cache will not work with docker. Dummy cache is not supported with OIDC.

locmemcache://, memcache://127.0.0.1:11211, redis://redis:6379/1

OIDC_ENABLED

Allow using an external OpenID Connect supplier for authentication, disabled by default. If enabled, the below settings are required to be set:

OIDC_PROVIDER_DISCOVERY_URI

OIDC_CLIENT_ID

OIDC_CLIENT_SECRET

This is set to false by default.

true or false

OIDC_PROVIDER

Provider used for OpenID Connect protocol authentication.

One of:

default: The default value when this parameter is unset. No specific changes will be made.

keycloak: Apply changes specific to Keycloak version 18 or later.

keycloak17: Apply changes specific to Keycloak version 17 or earlier.

lemonldapng: Apply changes specific to LemonLDAP::NG.

OIDC_PROVIDER_DISCOVERY_URI

Root URI of the provider, or URI of the OpenID Provider Configuration request. This will be used to discover the URLs of all endpoints and the rest of the configuration to use for this provider. If the URI does not end with /.well-known/openid-configuration, it will be added automatically.

Required when OIDC is enabled.

https://oidc.company.com/discovery

OIDC_CLIENT_ID

Client ID used to authenticate against the OpenID server.

Required when OIDC is enabled.

oidc_client

OIDC_CLIENT_SECRET

Client secret used to authenticate against the OpenID server.

Required when OIDC is enabled.

oidc_password

PROMETHEUS_METRICS_PORT

Network port used to expose internal monitoring metrics. That port should not be exposed publicly. Defaults to 3000

5000

DJANGO_LOG_LEVEL

Minimum log level for logs displayed on stderr in each container. Defaults to INFO

INFO WARNING ERROR

STORAGE_DIR

Directory used to store generated files (cluster thumbnails and CSV exports). Should be set as a docker volume mounted on the container for persistence.

/storage

ELEMENTS_IMPORT_CHUNKS

Number of elements iterated over by batch during Arkindex import, while reading the API (defaults to 100)

200

ELEMENTS_UPDATE_CHUNKS

Number of elements updated at once in the local database at the end of import (defaults to 100)

300