mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Add enforced minimal specs
This commit is contained in:
parent
71b56fc504
commit
733c5ad97d
1 changed files with 4 additions and 1 deletions
|
|
@ -493,8 +493,11 @@ class Builds extends Action
|
||||||
$vars[$var->getAttribute('key')] = $var->getAttribute('value', '');
|
$vars[$var->getAttribute('key')] = $var->getAttribute('value', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Some runtimes/frameworks can't compile with less memory than this
|
||||||
|
$minMemory = $resource->getCollection() === 'sites' ? 2048 : 1024;
|
||||||
|
|
||||||
$cpus = $spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT;
|
$cpus = $spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT;
|
||||||
$memory = max($spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT, 1024); // We have a minimum of 1024MB here because some runtimes can't compile with less memory than this.
|
$memory = max($spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT, $minMemory);
|
||||||
$timeout = (int) System::getEnv('_APP_COMPUTE_BUILD_TIMEOUT', 900);
|
$timeout = (int) System::getEnv('_APP_COMPUTE_BUILD_TIMEOUT', 900);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue