Skip to content

Commit 3a4c921

Browse files
committed
feat: CUBEJS_EXT_DB_* env variables support
1 parent 7ec6ac6 commit 3a4c921

File tree

1 file changed

+10
-0
lines changed
  • packages/cubejs-server-core/core

1 file changed

+10
-0
lines changed

packages/cubejs-server-core/core/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,16 @@ class CubejsServerCore {
174174
driverFactory: () => CubejsServerCore.createDriver(options.dbType),
175175
dialectFactory: () => CubejsServerCore.lookupDriverClass(options.dbType).dialectClass &&
176176
CubejsServerCore.lookupDriverClass(options.dbType).dialectClass(),
177+
externalDriverFactory: process.env.CUBEJS_EXT_DB_TYPE && (
178+
() => CubejsServerCore.lookupDriverClass(process.env.CUBEJS_DB_EXT_TYPE)({
179+
host: process.env.CUBEJS_EXT_DB_HOST,
180+
database: process.env.CUBEJS_EXT_DB_NAME,
181+
port: process.env.CUBEJS_EXT_DB_PORT,
182+
user: process.env.CUBEJS_EXT_DB_USER,
183+
password: process.env.CUBEJS_EXT_DB_PASS,
184+
})
185+
),
186+
externalDbType: process.env.CUBEJS_EXT_DB_TYPE,
177187
apiSecret: process.env.CUBEJS_API_SECRET,
178188
dbType: process.env.CUBEJS_DB_TYPE,
179189
devServer: process.env.NODE_ENV !== 'production',

0 commit comments

Comments
 (0)