mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 12:14:00 +00:00
settings could be set from env variables #304
This commit is contained in:
2
packages/api/env/portal/.env
vendored
2
packages/api/env/portal/.env
vendored
@@ -48,6 +48,8 @@ PASSWORD_relational=relational
|
|||||||
ENGINE_relational=mariadb@dbgate-plugin-mysql
|
ENGINE_relational=mariadb@dbgate-plugin-mysql
|
||||||
READONLY_relational=1
|
READONLY_relational=1
|
||||||
|
|
||||||
|
# SETTINGS_dataGrid.showHintColumns=1
|
||||||
|
|
||||||
# docker run -p 3000:3000 -e CONNECTIONS=mongo -e URL_mongo=mongodb://localhost:27017 -e ENGINE_mongo=mongo@dbgate-plugin-mongo -e LABEL_mongo=mongo dbgate/dbgate:beta
|
# docker run -p 3000:3000 -e CONNECTIONS=mongo -e URL_mongo=mongodb://localhost:27017 -e ENGINE_mongo=mongo@dbgate-plugin-mongo -e LABEL_mongo=mongo dbgate/dbgate:beta
|
||||||
|
|
||||||
# LOGINS=x,y
|
# LOGINS=x,y
|
||||||
|
|||||||
@@ -73,6 +73,14 @@ module.exports = {
|
|||||||
// res['app.useNativeMenu'] = os.platform() == 'darwin' ? true : false;
|
// res['app.useNativeMenu'] = os.platform() == 'darwin' ? true : false;
|
||||||
res['app.useNativeMenu'] = false;
|
res['app.useNativeMenu'] = false;
|
||||||
}
|
}
|
||||||
|
for (const envVar in process.env) {
|
||||||
|
if (envVar.startsWith('SETTINGS_')) {
|
||||||
|
const key = envVar.substring('SETTINGS_'.length);
|
||||||
|
if (!res[key]) {
|
||||||
|
res[key] = process.env[envVar];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user