Environment variables reference
Ensure that shell variables do not clash with variables in .env
The Neurobagel deployment recipe reads environment variables from a .env file
generated automatically by the Neurobagel configuration wizard from your nb_config.ini configuration file.
If the shell you run docker compose commands from already has any
shell variable of the same name set,
the shell variable will take precedence over the .env!
In this case, make sure to unset the local variable(s) first.
For more information, see Docker's environment variable precedence.
Tip
After running configure-nb to configure your deployment, double check that any variables you have customized are resolved with your expected values by running the command docker compose config in the directory with the generated .env.
Below are all possible configuration variables for a Neurobagel deployment.
Note that quickstart indicates whether the variable has an effect in a default test deployment.
Graph store
NB_GRAPH_USERNAME
Default: DBUSER
Configuration INI section: service:graph
Deployment profiles: quickstart, node
Description: Username to set for the graph database user.
NB_GRAPH_SECRETS_PATH
Default: ./secrets
Configuration INI section: service:graph
Deployment profiles: quickstart, node
Description: Path to files containing the secure passwords to set for the admin user (NB_GRAPH_ADMIN_PASSWORD.txt) and graph database user (NB_GRAPH_PASSWORD.txt).
NB_GRAPH_DB
Default: repositories/my_db
Configuration INI section: service:graph
Deployment profiles: quickstart, node
Description: Name for your your graph database, in the format repositories/{database_name}.
LOCAL_GRAPH_DATA
Default: ./data
Configuration INI section: service:graph
Deployment profiles: quickstart, node
Description: Path on your filesystem to the JSONLD files you want to upload to the graph database.
NB_GRAPH_PORT_HOST
Default: 7200
Configuration INI section: service:graph
Deployment profiles: quickstart
Description: Port number on the host machine to map the graph server container port to.
NB_GRAPH_MEMORY
Default: 2G
Configuration INI section: service:graph
Deployment profiles: quickstart, node
Description: The maximum amount of memory that can be used by graph. Equivalent to setting the -Xmx parameter on the JVM. Value should be a number followed by a letter denoting the unit.
Node API
NB_NAPI_TAG
Default: latest
Configuration INI section: service:node-api
Deployment profiles: quickstart, node
Description: Docker image tag for the Neurobagel node API.
NB_RETURN_AGG
Default: True
Configuration INI section: service:node-api
Deployment profiles: quickstart, node
Description: Whether to return only aggregate, dataset-level query results (excluding subject/session-level attributes). One of [true, false]
NB_MIN_CELL_SIZE
Default: 0
Configuration INI section: service:node-api
Deployment profiles: quickstart, node
Description: Minimum number of matching subjects required for a dataset to be returned as a query match. Datasets with matching subjects <= this number will be excluded from query results.
NB_NAPI_DOMAIN
Default: ""
Configuration INI section: service:node-api
Deployment profiles: node
Description: The domain name where the n-API will be hosted from.
NB_NAPI_BASE_PATH
Default: ""
Configuration INI section: service:node-api
Deployment profiles: node
Description: The URL path (path segment after the domain) where the node API should be served from. If set to a custom value, must include a leading slash.
NB_NAPI_PORT_HOST
Default: 8000
Configuration INI section: service:node-api
Deployment profiles: quickstart
Description: Port number on the host machine to map the Neurobagel node API container port to.
NB_CONFIG
Default: Neurobagel
Configuration INI section: service:node-api
Deployment profiles: quickstart, node
Description: Name of the Neurobagel community configuration to load, if the node uses a community's custom vocabularies.
Federation API
NB_FAPI_TAG
Default: latest
Configuration INI section: service:federation-api
Deployment profiles: quickstart, portal
Description: Docker image tag for the Neurobagel federation API.
NB_FEDERATE_REMOTE_PUBLIC_NODES
Default: True
Configuration INI section: service:federation-api
Deployment profiles: quickstart, portal
Description: If true, include public nodes in federation. If false, only locally specified nodes in local_nb_nodes.json are queried.
NB_FAPI_DOMAIN
Default: ""
Configuration INI section: service:federation-api
Deployment profiles: portal
Description: The domain name where the f-API will be hosted from.
NB_FAPI_BASE_PATH
Default: ""
Configuration INI section: service:federation-api
Deployment profiles: portal
Description: The URL path (path segment after the domain) where the federation API should be served from. If set to a custom value, must include a leading slash.
NB_FAPI_PORT_HOST
Default: 8080
Configuration INI section: service:federation-api
Deployment profiles: quickstart
Description: Port number on the host machine to map the Neurobagel federation API container port to.
Query tool
NB_QUERY_TAG
Default: latest
Configuration INI section: service:query
Deployment profiles: quickstart, portal
Description: Docker image tag for the query tool.
NB_API_QUERY_URL
Default: http://localhost:8080
Configuration INI section: service:query
Deployment profiles: quickstart
Description: URL of the Neurobagel f-API that the query tool will send its requests to. The query tool sends requests from a user's machine, so ensure the API URL is provided as a user would access it from their own machine. Ignored in a production deployment.
NB_QUERY_DOMAIN
Default: ""
Configuration INI section: service:query
Deployment profiles: portal
Description: The domain name where the query tool will be hosted from.
NB_QUERY_APP_BASE_PATH
Default: /
Configuration INI section: service:query
Deployment profiles: portal
Description: The URL path (path segment after the domain) where the query tool should be served from. Must include a leading slash.
NB_QUERY_PORT_HOST
Default: 3000
Configuration INI section: service:query
Deployment profiles: quickstart
Description: Port number on the host machine to map the query tool container port to.
NB_QUERY_HEADER_SCRIPT
For development environments only
Default: None
Configuration INI section: service:query
Deployment profiles: quickstart, portal
Description: Custom script to add to the header section of the query tool site, such as for a GDPR-aware analytics tool.
Experimental settings
NB_ENABLE_AUTH
Experimental
Default: False
Configuration INI section: service:experimental
Deployment profiles: quickstart, node, portal
Description: Whether to enable authentication for cohort queries. One of [true, false].
NB_QUERY_CLIENT_ID
Experimental
Default: None
Configuration INI section: service:experimental
Deployment profiles: quickstart, node, portal
Description: OAuth client ID for the query tool. Required if NB_ENABLE_AUTH is set to true.
Docker Compose configuration
COMPOSE_PROFILES
Configuration INI section: compose
Deployment profiles: node, portal
Description: Selects the production launch profile to use: node or portal. If not specified, will default to a test deployment. See the production deployment documentation for details.
COMPOSE_PROJECT_NAME
Default: neurobagel_quickstart
Configuration INI section: compose
Deployment profiles: quickstart, node, portal
Description: (Used only by Docker Compose) Prefix for container names in the deployment; useful when running multiple deployments on the same machine. This name will be set by default depending on the value of COMPOSE_PROFILES, but can be overridden if desired.