redis: disable by default when optional
this simply increases complexity of local setups since redis is only used as a cache and not for persistent data
This commit is contained in:
@@ -875,13 +875,15 @@ async function add(id, appStoreId, manifest, subdomain, domain, portBindings, da
|
||||
enableMailbox = data.enableMailbox || false,
|
||||
upstreamUri = data.upstreamUri || '',
|
||||
enableTurn = 'enableTurn' in data ? data.enableTurn : true,
|
||||
enableRedis = 'enableRedis' in data ? data.enableRedis : true,
|
||||
icon = data.icon || null,
|
||||
notes = data.notes || null,
|
||||
crontab = data.crontab || null,
|
||||
enableBackup = 'enableBackup' in data ? data.enableBackup : true,
|
||||
enableAutomaticUpdate = 'enableAutomaticUpdate' in data ? data.enableAutomaticUpdate : true;
|
||||
|
||||
// when redis is optional, do not enable it by default. it's mostly used for caching in those setups
|
||||
const enableRedis = 'enableRedis' in data ? data.enableRedis : !manifest.addons?.redis?.optional;
|
||||
|
||||
await checkForPortBindingConflict(portBindings, { appId: null });
|
||||
|
||||
const queries = [];
|
||||
@@ -1356,13 +1358,15 @@ async function install(data, auditSource) {
|
||||
overwriteDns = 'overwriteDns' in data ? data.overwriteDns : false,
|
||||
skipDnsSetup = 'skipDnsSetup' in data ? data.skipDnsSetup : false,
|
||||
enableTurn = 'enableTurn' in data ? data.enableTurn : true,
|
||||
enableRedis = 'enableRedis' in data ? data.enableRedis : true,
|
||||
appStoreId = data.appStoreId,
|
||||
upstreamUri = data.upstreamUri || '',
|
||||
manifest = data.manifest,
|
||||
notes = data.notes || null,
|
||||
crontab = data.crontab || null;
|
||||
|
||||
// when redis is optional, do not enable it by default. it's mostly used for caching in those setups
|
||||
const enableRedis = 'enableRedis' in data ? data.enableRedis : !manifest.addons?.redis?.optional;
|
||||
|
||||
let error = manifestFormat.parse(manifest);
|
||||
if (error) throw new BoxError(BoxError.BAD_FIELD, `Manifest error: ${error.message}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user