wp-mb-kit/scripts/beforeInstall.js

38 lines
951 B
JavaScript
Raw Permalink Normal View History

2024-09-20 15:00:24 +00:00
var wpProtectAddon = getParam('settings.wpProtectAddon', true);
var wpbfp = wpProtectAddon ? "THROTTLE" : "OFF";
var phpVersion = getParam('settings.phpVersion', 'php8.3');
var wafAddon = getParam('settings.wafAddon', true);
var resp = {
result: 0,
2024-11-11 17:13:40 +00:00
ssl: !!jelastic.billing.account.GetQuotas('environment.jelasticssl.enabled').array[0].value,
2024-11-11 17:09:10 +00:00
nodes: [{
nodeType: "storage",
2024-11-11 17:13:40 +00:00
flexibleCloudlets: ${settings.st_flexibleCloudlets:8},
fixedCloudlets: ${settings.st_fixedCloudlets:1},
diskLimit: ${settings.st_diskLimit:100},
2024-11-11 17:09:10 +00:00
nodeGroup: "storage",
displayName: "Storage"
}]
2024-11-11 17:13:40 +00:00
}
2024-09-19 16:08:04 +00:00
resp.nodes.push({
2024-09-20 14:24:24 +00:00
nodeType: "llsmp",
2024-09-20 15:00:24 +00:00
engine: phpVersion,
2024-09-20 14:24:24 +00:00
count: 1,
2024-09-20 14:33:41 +00:00
cloudlets: 16,
diskLimit: 10,
2024-09-20 14:24:24 +00:00
nodeGroup: "cp",
skipNodeEmails: true,
displayName: "AppServer",
env: {
2024-09-19 16:08:04 +00:00
SERVER_WEBROOT: "/var/www/webroot/ROOT",
REDIS_ENABLED: "true",
2024-09-20 15:00:24 +00:00
WAF: wafAddon,
2024-09-19 16:08:04 +00:00
WP_PROTECT: wpbfp,
WP_PROTECT_LIMIT: 100
2024-09-20 14:24:24 +00:00
}
2024-09-20 14:33:41 +00:00
});
2024-09-19 12:06:36 +00:00
2024-09-20 15:00:24 +00:00
return resp;