Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CB-4095. Added env variables for configurations parameters #2905

Merged
merged 13 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions config/sample-databases/DefaultConfiguration/cloudbeaver.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
server: {
serverPort: 8978,
serverPort: "${CLOUDBEAVER_SERVICE_PORT:8978}",

workspaceLocation: "workspace",
workspaceLocation: "${CLOUDBEAVER_WORKSPACE_LOCATION:workspace}",
contentRoot: "web",
driversLocation: "drivers",

Expand All @@ -27,9 +27,9 @@
sql.proposals.insert.table.alias: PLAIN
},

expireSessionAfterPeriod: 1800000,
expireSessionAfterPeriod: "${CLOUDBEAVER_EXPIRE_SESSION_AFTER_PERIOD:1800000}",

develMode: false,
develMode: "${CLOUDBEAVER_DEVEL_MODE:false}",

enableSecurityManager: false,

Expand Down Expand Up @@ -64,29 +64,29 @@

},
app: {
anonymousAccessEnabled: true,
anonymousUserRole: "user",
defaultUserTeam: "user",
grantConnectionsAccessToAnonymousTeam: false,
supportsCustomConnections: false,
showReadOnlyConnectionInfo: false,
anonymousAccessEnabled: "${CLOUDBEAVER_ANONYMOUS_ACCESS_ENABLED:true}",
anonymousUserRole: user,
defaultUserTeam: "${CLOUDBEAVER_DEFAULT_USER_TEAM:user}",
grantConnectionsAccessToAnonymousTeam: "${CLOUDBEAVER_GRANT_CONNECTIONS_ACCESS_TO_ANONYMOUS_TEAM:false}",
supportsCustomConnections: "${CLOUDBEAVER_SUPPORTS_CUSTOM_CONNECTIONS:false}",
showReadOnlyConnectionInfo: "${CLOUDBEAVER_READ_ONLY_CONNECTION_INFO:false}",
systemVariablesResolvingEnabled: "${CLOUDBEAVER_SYSTEM_VARIABLES_RESOLVING_ENABLED:false}",

forwardProxy: false,
forwardProxy: "${CLOUDBEAVER_FORWARD_PROXY:false}",

publicCredentialsSaveEnabled: true,
adminCredentialsSaveEnabled: true,
publicCredentialsSaveEnabled: "${CLOUDBEAVER_PUBLIC_CREDENTIALS_SAVE_ENABLED:true}",
adminCredentialsSaveEnabled: "${CLOUDBEAVER_ADMIN_CREDENTIALS_SAVE_ENABLED:true}",

resourceManagerEnabled: true,
resourceManagerEnabled: "${CLOUDBEAVER_RESOURCE_MANAGER_ENABLED:true}",

resourceQuotas: {
dataExportFileSizeLimit: 10000000,
resourceManagerFileSizeLimit: 500000,
sqlMaxRunningQueries: 100,
sqlResultSetRowsLimit: 100000,
sqlResultSetMemoryLimit: 2000000,
sqlTextPreviewMaxLength: 4096,
sqlBinaryPreviewMaxLength: 261120
dataExportFileSizeLimit: "${CLOUDBEAVER_DATA_EXPORT_FILE_SIZE_LIMIT:10000000}",
DenisSinelnikov marked this conversation as resolved.
Show resolved Hide resolved
resourceManagerFileSizeLimit: "${CLOUDBEAVER_RESOURCE_MANAGER_FILE_SIZE_LIMIT:500000}",
sqlMaxRunningQueries: "${CLOUDBEAVER_SQL_MAX_RUNNING_QUERIES:100}",
sqlResultSetRowsLimit: "${CLOUDBEAVER_SQL_RESULT_SET_ROWS_LIMIT:100000}",
sqlResultSetMemoryLimit: "${CLOUDBEAVER_SQL_RESULT_SET_MEMORY_LIMIT:2000000}",
sqlTextPreviewMaxLength: "${CLOUDBEAVER_SQL_TEXT_PREVIEW_MAX_LENGTH:4096}",
sqlBinaryPreviewMaxLength: "${CLOUDBEAVER_SQL_BINARY_PREVIEW_MAX_LENGTH:261120}"
},
enabledAuthProviders: [
"local"
Expand Down
40 changes: 20 additions & 20 deletions config/sample-databases/SQLiteConfiguration/cloudbeaver.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
server: {
serverPort: 8978,
serverPort: "${CLOUDBEAVER_SERVICE_PORT:8978}",

workspaceLocation: "workspace",
workspaceLocation: "${CLOUDBEAVER_WORKSPACE_LOCATION:workspace}",
contentRoot: "web",
driversLocation: "drivers",

Expand All @@ -25,9 +25,9 @@
sql.proposals.insert.table.alias: PLAIN
},

expireSessionAfterPeriod: 1800000,
expireSessionAfterPeriod: "${CLOUDBEAVER_EXPIRE_SESSION_AFTER_PERIOD:1800000}",

develMode: false,
develMode: "${CLOUDBEAVER_DEVEL_MODE:false}",

enableSecurityManager: false,

Expand Down Expand Up @@ -61,28 +61,28 @@

},
app: {
anonymousAccessEnabled: true,
anonymousUserRole: "user",
grantConnectionsAccessToAnonymousTeam: false,
supportsCustomConnections: false,
showReadOnlyConnectionInfo: false,
anonymousAccessEnabled: "${CLOUDBEAVER_ANONYMOUS_ACCESS_ENABLED:true}",
DenisSinelnikov marked this conversation as resolved.
Show resolved Hide resolved
anonymousUserRole: user,
grantConnectionsAccessToAnonymousTeam: "${CLOUDBEAVER_GRANT_CONNECTIONS_ACCESS_TO_ANONYMOUS_TEAM:false}",
supportsCustomConnections: "${CLOUDBEAVER_SUPPORTS_CUSTOM_CONNECTIONS:false}",
showReadOnlyConnectionInfo: "${CLOUDBEAVER_READ_ONLY_CONNECTION_INFO:false}",
systemVariablesResolvingEnabled: "${CLOUDBEAVER_SYSTEM_VARIABLES_RESOLVING_ENABLED:false}",

forwardProxy: false,
forwardProxy: "${CLOUDBEAVER_FORWARD_PROXY:false}",

publicCredentialsSaveEnabled: true,
adminCredentialsSaveEnabled: true,
publicCredentialsSaveEnabled: "${CLOUDBEAVER_PUBLIC_CREDENTIALS_SAVE_ENABLED:true}",
adminCredentialsSaveEnabled: "${CLOUDBEAVER_ADMIN_CREDENTIALS_SAVE_ENABLED:true}",

resourceManagerEnabled: true,
resourceManagerEnabled: "${CLOUDBEAVER_RESOURCE_MANAGER_ENABLED:true}",

resourceQuotas: {
dataExportFileSizeLimit: 10000000,
resourceManagerFileSizeLimit: 500000,
sqlMaxRunningQueries: 100,
sqlResultSetRowsLimit: 100000,
sqlResultSetMemoryLimit: 2000000,
sqlTextPreviewMaxLength: 4096,
sqlBinaryPreviewMaxLength: 261120
dataExportFileSizeLimit: "${CLOUDBEAVER_DATA_EXPORT_FILE_SIZE_LIMIT:10000000}",
resourceManagerFileSizeLimit: "${CLOUDBEAVER_RESOURCE_MANAGER_FILE_SIZE_LIMIT:500000}",
sqlMaxRunningQueries: "${CLOUDBEAVER_SQL_MAX_RUNNING_QUERIES:100}",
sqlResultSetRowsLimit: "${CLOUDBEAVER_SQL_RESULT_SET_ROWS_LIMIT:100000}",
sqlResultSetMemoryLimit: "${CLOUDBEAVER_SQL_RESULT_SET_MEMORY_LIMIT:2000000}",
sqlTextPreviewMaxLength: "${CLOUDBEAVER_SQL_TEXT_PREVIEW_MAX_LENGTH:4096}",
sqlBinaryPreviewMaxLength: "${CLOUDBEAVER_SQL_BINARY_PREVIEW_MAX_LENGTH:261120}"
},
enabledAuthProviders: [
"local"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
server: {
serverPort: "${CLOUDBEAVER_TEST_PORT:18978}",
serverName: "CloudBeaver CE Test Server",
serverName: "${CLOUDBEAVER_SERVER_NAME:CloudBeaver CE Test Server}",

workspaceLocation: "workspace",
workspaceLocation: "${CLOUDBEAVER_WORKSPACE_LOCATION:workspace}",
contentRoot: "workspace/web",
driversLocation: "../../../deploy/",

Expand All @@ -12,37 +12,37 @@

productSettings: {},

expireSessionAfterPeriod: 1800000,
expireSessionAfterPeriod: "${CLOUDBEAVER_EXPIRE_SESSION_AFTER_PERIOD:1800000}",

develMode: false,
develMode: "${CLOUDBEAVER_DEVEL_MODE:false}",

sm: {
enableBruteForceProtection: "${CLOUDBEAVER_BRUTE_FORCE_PROTECTION_ENABLED:false}"
},

database: {
driver="h2_embedded_v2",
url: "jdbc:h2:mem:testdb",
driver: "${CLOUDBEAVER_DB_DRIVER:h2_embedded_v2}",
url: "${CLOUDBEAVER_DB_URL:jdbc:h2:mem:testdb}",

createDatabase: true,
createDatabase: "${CLOUDBEAVER_CREATE_DATABASE:true}",

initialDataConfiguration: "workspace/conf/initial-data.conf",
initialDataConfiguration: "${CLOUDBEAVER_DB_INITIAL_DATA:workspace/conf/initial-data.conf}",

pool: {
minIdleConnections: 4,
maxIdleConnections: 10,
maxConnections: 100,
validationQuery: "SELECT 1"
minIdleConnections: "${CLOUDBEAVER_DB_MIN_IDLE_CONNECTIONS:4}",
maxIdleConnections: "${CLOUDBEAVER_DB_MAX_IDLE_CONNECTIONS:10}",
maxConnections: "${CLOUDBEAVER_DB_MAX_CONNECTIONS:100}",
validationQuery: "${CLOUDBEAVER_DB_VALIDATION_QUERY:SELECT 1}"
}
}

},
app: {
anonymousAccessEnabled: true,
anonymousUserRole: "user",
defaultUserTeam: "user",
supportsCustomConnections: true,
enableReverseProxyAuth: true,
anonymousAccessEnabled: "${CLOUDBEAVER_ANONYMOUS_ACCESS_ENABLED:true}",
anonymousUserRole: user,
defaultUserTeam: "${CLOUDBEAVER_DEFAULT_USER_TEAM:user}",
supportsCustomConnections: "${CLOUDBEAVER_SUPPORTS_CUSTOM_CONNECTIONS:true}",
enableReverseProxyAuth: "${CLOUDBEAVER_ENABLE_REVERSE_PROXY_AUTH:true}",
enabledAuthProviders: [
"local",
"reverseProxy"
Expand All @@ -52,13 +52,13 @@
],

resourceQuotas: {
dataExportFileSizeLimit: 10000000,
sqlMaxRunningQueries: 100,
sqlResultSetRowsLimit: 100000,
sqlResultSetMemoryLimit: 2000000,
sqlTextPreviewMaxLength: 4096,
sqlBinaryPreviewMaxLength: 261120,
sqlQueryTimeout: 5
dataExportFileSizeLimit: "${CLOUDBEAVER_DATA_EXPORT_FILE_SIZE_LIMIT:10000000}",
sqlMaxRunningQueries: "${CLOUDBEAVER_SQL_MAX_RUNNING_QUERIES:100}",
sqlResultSetRowsLimit: "${CLOUDBEAVER_SQL_RESULT_SET_ROWS_LIMIT:100000}",
sqlResultSetMemoryLimit: "${CLOUDBEAVER_SQL_RESULT_SET_MEMORY_LIMIT:2000000}",
sqlTextPreviewMaxLength: "${CLOUDBEAVER_SQL_TEXT_PREVIEW_MAX_LENGTH:4096}",
sqlBinaryPreviewMaxLength: "${CLOUDBEAVER_SQL_BINARY_PREVIEW_MAX_LENGTH:261120}",
sqlQueryTimeout: "${CLOUDBEAVER_SQL_QUERY_TIMEOUT:5}"
},

disabledDrivers: [
Expand Down
Loading