1
0
Fork 0
mirror of synced 2024-09-08 05:31:47 +12:00

Merge pull request #10518 from Budibase/fix/allow-passwordless-redis

allow passwordless redis
This commit is contained in:
Martin McKeaveney 2023-05-08 16:41:41 +01:00 committed by GitHub
commit d03293dbd4
3 changed files with 14 additions and 10 deletions

View file

@ -95,7 +95,7 @@ const environment = {
GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET, GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET,
SALT_ROUNDS: process.env.SALT_ROUNDS, SALT_ROUNDS: process.env.SALT_ROUNDS,
REDIS_URL: process.env.REDIS_URL || "localhost:6379", REDIS_URL: process.env.REDIS_URL || "localhost:6379",
REDIS_PASSWORD: process.env.REDIS_PASSWORD || "budibase", REDIS_PASSWORD: process.env.REDIS_PASSWORD,
REDIS_CLUSTERED: process.env.REDIS_CLUSTERED, REDIS_CLUSTERED: process.env.REDIS_CLUSTERED,
MOCK_REDIS: process.env.MOCK_REDIS, MOCK_REDIS: process.env.MOCK_REDIS,
MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY, MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,

View file

@ -42,13 +42,17 @@ if (!env.isTest()) {
host: REDIS_OPTS.host, host: REDIS_OPTS.host,
port: REDIS_OPTS.port, port: REDIS_OPTS.port,
}, },
password: }
REDIS_OPTS.opts.password || REDIS_OPTS.opts.redisOptions.password,
if (REDIS_OPTS.opts?.password || REDIS_OPTS.opts.redisOptions?.password) {
// @ts-ignore
options.password =
REDIS_OPTS.opts.password || REDIS_OPTS.opts.redisOptions.password
} }
if (!env.REDIS_CLUSTERED) { if (!env.REDIS_CLUSTERED) {
// Can't set direct redis db in clustered env
// @ts-ignore // @ts-ignore
// Can't set direct redis db in clustered env
options.database = 1 options.database = 1
} }
} }

View file

@ -1486,15 +1486,15 @@
pouchdb-promise "^6.0.4" pouchdb-promise "^6.0.4"
through2 "^2.0.0" through2 "^2.0.0"
"@budibase/pro@2.6.6": "@budibase/pro@2.6.7":
version "2.6.6" version "2.6.7"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.6.6.tgz#337027168d17a44717c2648b3209a0e2daddcf7d" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.6.7.tgz#884b33f3a3e3f2e548fd7519d32b40dc98803400"
integrity sha512-RldUn/WjN7eaYRxL4KBufK1yhVIycJOzoncD+BPgRKstuuuYzPultGZcpNsQQiJkAhNR6QXhG+ovvCUiA+AX6g== integrity sha512-f7g+0So7hr7tHHEF28cz550imYpq/CqRNzhMQpUwmzgbdTlOdVej3PWPNK9+MuBlNea3J9b2WQsjS9TkGZfTlA==
dependencies: dependencies:
"@budibase/backend-core" "2.6.6" "@budibase/backend-core" "2.6.7"
"@budibase/shared-core" "2.5.9" "@budibase/shared-core" "2.5.9"
"@budibase/string-templates" "2.5.9" "@budibase/string-templates" "2.5.9"
"@budibase/types" "2.6.6" "@budibase/types" "2.6.7"
"@koa/router" "8.0.8" "@koa/router" "8.0.8"
bull "4.10.1" bull "4.10.1"
joi "17.6.0" joi "17.6.0"