do not restrict memory on startup of database addons
this helps the import case where we need all the memory we can get. we scale the memory down once platform is ready in any case.
This commit is contained in:
@@ -1170,7 +1170,6 @@ function startMysql(existingInfra, callback) {
|
||||
const dataDir = paths.PLATFORM_DATA_DIR;
|
||||
const rootPassword = hat(8 * 128);
|
||||
const cloudronToken = hat(8 * 128);
|
||||
const memoryLimit = 4 * 256;
|
||||
|
||||
const upgrading = existingInfra.version !== 'none' && requiresUpgrade(existingInfra.images.mysql.tag, tag);
|
||||
|
||||
@@ -1180,6 +1179,7 @@ function startMysql(existingInfra, callback) {
|
||||
upgradeFunc(function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
// memory options are applied dynamically. import requires all the memory we can get
|
||||
const cmd = `docker run --restart=always -d --name="mysql" \
|
||||
--hostname mysql \
|
||||
--net cloudron \
|
||||
@@ -1188,8 +1188,6 @@ function startMysql(existingInfra, callback) {
|
||||
--log-opt syslog-address=udp://127.0.0.1:2514 \
|
||||
--log-opt syslog-format=rfc5424 \
|
||||
--log-opt tag=mysql \
|
||||
-m ${memoryLimit}m \
|
||||
--memory-swap ${memoryLimit * 2}m \
|
||||
--dns 172.18.0.1 \
|
||||
--dns-search=. \
|
||||
-e CLOUDRON_MYSQL_TOKEN=${cloudronToken} \
|
||||
@@ -1401,6 +1399,7 @@ function startPostgresql(existingInfra, callback) {
|
||||
upgradeFunc(function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
// memory options are applied dynamically. import requires all the memory we can get
|
||||
const cmd = `docker run --restart=always -d --name="postgresql" \
|
||||
--hostname postgresql \
|
||||
--net cloudron \
|
||||
@@ -1611,7 +1610,6 @@ function startMongodb(existingInfra, callback) {
|
||||
const dataDir = paths.PLATFORM_DATA_DIR;
|
||||
const rootPassword = hat(8 * 128);
|
||||
const cloudronToken = hat(8 * 128);
|
||||
const memoryLimit = 4 * 256;
|
||||
|
||||
const upgrading = existingInfra.version !== 'none' && requiresUpgrade(existingInfra.images.mongodb.tag, tag);
|
||||
|
||||
@@ -1621,6 +1619,7 @@ function startMongodb(existingInfra, callback) {
|
||||
upgradeFunc(function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
// memory options are applied dynamically. import requires all the memory we can get
|
||||
const cmd = `docker run --restart=always -d --name="mongodb" \
|
||||
--hostname mongodb \
|
||||
--net cloudron \
|
||||
@@ -1629,8 +1628,6 @@ function startMongodb(existingInfra, callback) {
|
||||
--log-opt syslog-address=udp://127.0.0.1:2514 \
|
||||
--log-opt syslog-format=rfc5424 \
|
||||
--log-opt tag=mongodb \
|
||||
-m ${memoryLimit}m \
|
||||
--memory-swap ${memoryLimit * 2}m \
|
||||
--dns 172.18.0.1 \
|
||||
--dns-search=. \
|
||||
-e CLOUDRON_MONGODB_ROOT_PASSWORD="${rootPassword}" \
|
||||
|
||||
Reference in New Issue
Block a user