-
Steve Reis authored
gateway.md 5.27 KiB
description: >-
This page description all the possible configuration that can be made in the
Gateway.
Gateway
:toolbox: Options
General
name | type | default | description |
---|---|---|---|
ENGINE_TYPE | string | exareme | Define the connector that should be used : exareme, datashield, csv, local . |
ENGINE_BASE_URL | string | http://127.0.0.1:8080/services/ | Specify the endpoint for the data source. The parameter will be provided for the connector. |
TOS_SKIP | boolean | false | Allow to skip the terms of services (this parameter is provided to the frontend) |
GATEWAY_PORT | number | 8081 | Indicate the port that should be used by the gateway |
NODE_ENV | string | dev | Value can be prod or dev
|
BASE_URL_CONTEXT | string | null | Define context of the gateway. E.g. api if the api is under http://127.0.0.1/api/
|
ONTOLOGY_URL | string | null | Define ontology's url |
Authentication
name | type | default | description |
---|---|---|---|
AUTH_SKIP | boolean | false | Allow to skip authentication. Warn: all routes will be accessible without authentication. |
AUTH_JWT_SECRET | string | N/A | Secret that should be used to generate JWT |
AUTH_JWT_REFRESH_SECRET | string | N/A | Secret that should be used to generate Refresh Token |
AUTH_JWT_TOKEN_EXPIRES_IN | string | '1h' |
JWT time to live. Expressed in seconds or a string describing a time span vercel/ms |
AUTH_JWT_REFRESH_TOKEN_EXPIRES_IN | '2d' |
Refresh token time to live. Expressed in seconds or a string describing a time span vercel/ms |
|
AUTH_COOKIE_SAME_SITE | string | 'strict' | Specify the cookie same site option. Value can be lax , strict or none
|
AUTH_COOKIE_SECURE | boolean | true | Specify the cookie secure option. Should be set to true if same site is not set to strict . |
AUTH_ENABLE_SSO | boolean | false | Enable SSO login process, this variable will be provided to the frontend in order to perform the login. |
Database
name | type | default | description |
---|---|---|---|
DB_HOST | string | localhost | Hostname |
DB_PORT | number | 5432 | Port number |
DB_USERNAME | string | postgres | Username |
DB_PASSWORD | string | pass123 | Password |
DB_NAME | string | postgres | Name of the database's instance |
Cache
The Gateway offers the possibility to cache some of the most used queries (domains and algorithms queries). This cache use In-Memory data store.
name | type | default | description |
---|---|---|---|
CACHE_ENABLED | boolean | true | Enable or disable the cache |
CACHE_TTL | number | 1800 | Define (in seconds) time to live for cached elements. |
CACHE_MAX_ITEMS | number | 100 | Max items that can be cached at the same time |
Overwrite parameters
These parameters can be overwrite by either
- setting a variable in
.env
file (you can create it if it does not exist) along with the file.env.defaults
in the root folder - or setting an environment variable on your system
Default variables are stored in the .env.defaults
file, under the db.config.ts
file for the database configuration and matomo.config.ts
for Matomo configuration.