This commit is contained in:
Jan Prochazka 2022-02-03 17:45:50 +01:00
parent c14d0fa360
commit 1c2861f171
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
DEVMODE=1
CONNECTIONS=mysql,postgres,mongo,mongo2,mysqlssh
CONNECTIONS=mysql,postgres,mongo,mongo2,mysqlssh,sqlite
LABEL_mysql=MySql localhost
SERVER_mysql=localhost
@ -37,4 +37,8 @@ SSH_MODE_mysqlssh=userPassword
SSH_LOGIN_mysqlssh=root
SSH_PASSWORD_mysqlssh=xxx
LABEL_sqlite=sqlite
FILE_sqlite=/home/jena/dbgate-data/files/sqlite/feeds.sqlite
ENGINE_sqlite=sqlite@dbgate-plugin-sqlite
# 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

View File

@ -50,8 +50,10 @@ function getPortalCollections() {
databaseUrl: process.env[`URL_${id}`],
useDatabaseUrl: !!process.env[`URL_${id}`],
databaseFile: process.env[`FILE_${id}`],
defaultDatabase: process.env[`DATABASE_${id}`],
singleDatabase: !!process.env[`DATABASE_${id}`],
defaultDatabase:
process.env[`DATABASE_${id}`] ||
(process.env[`FILE_${id}`] ? getDatabaseFileLabel(process.env[`FILE_${id}`]) : null),
singleDatabase: !!process.env[`DATABASE_${id}`] || !!process.env[`FILE_${id}`],
displayName: process.env[`LABEL_${id}`],
// SSH tunnel