diff --git a/CHANGES b/CHANGES index 9e3c2a938..09d4ec27b 100644 --- a/CHANGES +++ b/CHANGES @@ -2257,4 +2257,5 @@ * Fix display of user management/dashboard visiblity for email apps * graphite: disable tagdb and reduce log noise * hsts: change max-age to 2 years +* clone: copy over redis memory limit diff --git a/src/appdb.js b/src/appdb.js index ac56ba646..978a1da74 100644 --- a/src/appdb.js +++ b/src/appdb.js @@ -216,15 +216,16 @@ function add(id, appStoreId, manifest, location, domain, portBindings, data, cal const mailboxName = data.mailboxName || null; const mailboxDomain = data.mailboxDomain || null; const reverseProxyConfigJson = data.reverseProxyConfig ? JSON.stringify(data.reverseProxyConfig) : null; + const servicesConfigJson = data.servicesConfig ? JSON.stringify(data.servicesConfig) : null; var queries = []; queries.push({ query: 'INSERT INTO apps (id, appStoreId, manifestJson, installationState, runState, accessRestrictionJson, memoryLimit, cpuShares, ' - + 'sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson) ' - + ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + + 'sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson, servicesConfigJson) ' + + ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', args: [ id, appStoreId, manifestJson, installationState, runState, accessRestrictionJson, memoryLimit, cpuShares, - sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson ] + sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson, servicesConfigJson ] }); queries.push({ diff --git a/src/apps.js b/src/apps.js index 5b2bd5fcb..1f72e44a5 100644 --- a/src/apps.js +++ b/src/apps.js @@ -1685,9 +1685,9 @@ function clone(app, data, user, auditSource, callback) { validateLocations(locations, function (error, domainObjectMap) { if (error) return callback(error); - var newAppId = uuid.v4(); + const newAppId = uuid.v4(); - var data = { + const data = { installationState: exports.ISTATE_PENDING_CLONE, runState: exports.RSTATE_RUNNING, memoryLimit: app.memoryLimit, @@ -1699,7 +1699,8 @@ function clone(app, data, user, auditSource, callback) { reverseProxyConfig: app.reverseProxyConfig, env: app.env, alternateDomains: [], - aliasDomains: [] + aliasDomains: [], + servicesConfig: app.servicesConfig }; appdb.add(newAppId, appStoreId, manifest, location, domain, translatePortBindings(portBindings, manifest), data, function (error) {