Copied original

main
Anthony 2024-09-19 20:52:54 +08:00
parent cd68165b71
commit 16c461129c
1 changed files with 31 additions and 71 deletions

View File

@ -1,31 +1,3 @@
/* var wpbfp = '${settings.wp_protect}' == 'true' ? "THROTTLE" : "OFF";
var resp = {
result: 0,
ssl: !!jelastic.billing.account.GetQuotas('environment.jelasticssl.enabled').array[0].value,
nodes: []
}
resp.nodes.push({
nodeType: "llsmp",
engine: "${settings.php_engine:php8.3}",
count: 1,
cloudlets: "${settings.cloudlets:16}",
diskLimit: "${settings.diskspace:[quota.disk.limitation]}",
nodeGroup: "cp",
skipNodeEmails: "true",
displayName: "AppServer",
env: {
SERVER_WEBROOT: "/var/www/webroot/ROOT",
REDIS_ENABLED: "true",
WAF: "${settings.waf}",
WP_PROTECT: wpbfp,
WP_PROTECT_LIMIT: 100
}
})
return resp; */
var wpbfp = '${settings.wp_protect}' == 'true' ? "THROTTLE" : "OFF"; var wpbfp = '${settings.wp_protect}' == 'true' ? "THROTTLE" : "OFF";
var resp = { var resp = {
@ -34,47 +6,35 @@ var resp = {
nodes: [] nodes: []
} }
// Existing Application Server Node if ('${settings.ls-addon:false}'== 'true') {
resp.nodes.push({ resp.nodes.push({
nodeType: "llsmp", nodeType: "llsmp",
engine: "${settings.php_engine:php8.3}", count: 1,
count: 1, flexibleCloudlets: ${settings.flexibleCloudlets:16},
cloudlets: "${settings.cloudlets:16}", fixedCloudlets: ${settings.fixedCloudlets:1},
diskLimit: "${settings.diskspace:[quota.disk.limitation]}", nodeGroup: "cp",
nodeGroup: "cp", displayName: "AppServer",
skipNodeEmails: "true", env: {
displayName: "AppServer", SERVER_WEBROOT: "/var/www/webroot/ROOT",
env: { REDIS_ENABLED: "true",
SERVER_WEBROOT: "/var/www/webroot/ROOT", WAF: "${settings.waf}",
REDIS_ENABLED: "true", WP_PROTECT: wpbfp,
WAF: "${settings.waf}", WP_PROTECT_LIMIT: 100
WP_PROTECT: wpbfp, }
WP_PROTECT_LIMIT: 100 })
} } else {
}) resp.nodes.push({
nodeType: "lemp",
// Adding the Storage Node count: 1,
resp.nodes.push({ flexibleCloudlets: ${settings.flexibleCloudlets:16},
nodeType: "storage", // Valid nodeType as per your environment fixedCloudlets: ${settings.fixedCloudlets:1},
count: 1, nodeGroup: "cp",
cloudlets: "${settings.storage_cloudlets:6}", // Default to 6 cloudlets if not specified displayName: "AppServer",
diskLimit: "${settings.storage_diskspace:30000}", // Default to 30000 MB if not specified env: {
nodeGroup: "storage", SERVER_WEBROOT: "/var/www/webroot/ROOT",
skipNodeEmails: "true", REDIS_ENABLED: "true"
displayName: "Shared Storage", }
env: { })
// Include necessary environment variables }
STACK_VERSION: "2.0-9.6",
STACK_USER: "root",
// Add other variables if needed
},
customitem: {
dockerName: "jelastic/storage",
dockerTag: "2.0-9.6",
dockerVolumes: [
"/data"
]
}
})
return resp; return resp;