diff --git a/backend/src/config.ts b/backend/src/config.ts index 1744d1e7..ea662e59 100644 --- a/backend/src/config.ts +++ b/backend/src/config.ts @@ -46,6 +46,6 @@ export const CALL_AWS_REGION = process.env.CALL_AWS_REGION || undefined; export const CALL_S3_WITH_PATH_STYLE_ACCESS = process.env.CALL_S3_WITH_PATH_STYLE_ACCESS || 'true'; // Deployment related configuration -export const OPENVIDU_ENVIRONMENT = process.env.OPENVIDU_ENVIRONMENT || undefined; +export const MODULES_FILE = process.env.MODULES_FILE || undefined; export const MODULE_NAME = process.env.MODULE_NAME || 'app'; export const ENABLED_MODULES = process.env.ENABLED_MODULES || ''; diff --git a/backend/src/server.ts b/backend/src/server.ts index 6def90fd..2df3bcb1 100644 --- a/backend/src/server.ts +++ b/backend/src/server.ts @@ -25,7 +25,7 @@ import { SERVER_CORS_ORIGIN, CALL_S3_PARENT_DIRECTORY, CALL_S3_RECORDING_DIRECTORY, - OPENVIDU_ENVIRONMENT, + MODULES_FILE, ENABLED_MODULES, MODULE_NAME, } from './config.js'; @@ -142,7 +142,7 @@ const isMainModule = (): boolean => { }; const checkModuleIsEnabled = () => { - if (OPENVIDU_ENVIRONMENT) { + if (MODULES_FILE) { const moduleName = MODULE_NAME; const enabledModules = ENABLED_MODULES.split(',').map((module) => module.trim()); diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 338c696f..0e984086 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -29,6 +29,11 @@ if [ -z "${CALL_CONFIG_DIR}" ]; then fi fi +if [ -n "${MODULES_FILE}" ]; then + # shellcheck disable=SC1090 + . "${MODULES_FILE}" +fi + cd /opt/openvidu-call || { echo "Can't cd into /opt/openvidu-call"; exit 1; } node dist/src/server.js &