Configurable Environment Variables

July 6, 2021 ยท View on GitHub

Database settings

VariableDefaultDescription
GKB_DBS_PASSrootDatabase server password
GKB_DBS_USERrootDatabase server username
GKB_DB_PORT2426Port the DB server is using
GKB_DB_HOSTorientdb02.bcgsc.caHost the DB server is using
GKB_DB_USERadminDatabase username
GKB_DB_PASSadminDatabase password
GKB_DB_NAMEkbapi_<VERSION>Database name to use
GKB_DB_CREATEfalseSet this to 1 to create the database if it does not exist
GKB_DB_MIGRATEfalseSet this to 1 to attempt to migrate the database if it exists and requires migration

API Settings

VariableDefaultDescription
GKB_PORT8080Port for the API to start on
GKB_KEY_FILEid_rsaPath to the private key to use for generating tokens
GKB_LOG_LEVELinfoThe level of information to log to the screen and log files
GKB_BASE_PATHThe base path for requests to the API. This should be changed if you are serving the API from a subdirectory/path

Key Cloak Settings

VariableDefaultDescription
GKB_KEYCLOAK_URIhttp://ga4ghdev01.bcgsc.ca:8080/auth/realms/TestKB/protocol/openid-connect/tokendefaults to https://sso.bcgsc.ca/auth/realms/GSC/protocol/openid-connect/token for production environments
GKB_KEYCLOAK_CLIENTIDGraphKB
GKB_KEYCLOAK_KEYFILEkeycloak.id_rsa.pubpath to the public key file used to verify keycloak tokens
GKB_KEYCLOAK_ROLEGraphKBThe required role to get from the keycloak user registration
GKB_DISABLE_AUTHSet to 1 to disable the external (keycloak) authentication (For testing)

Logging

By default the API will log at the warning level. This can be configured using the environment variable GKB_LOG_LEVEL which must be one of: info, error, warn, info, verbose, or debug (corresponding to the npm logging levels)

export GKB_LOG_LEVEL=error