Untested code to perform an update of server build settings

This commit is contained in:
Dane Everitt 2019-11-24 15:08:54 -08:00
parent c17f9ba8a9
commit 547e8840e2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 306 additions and 141 deletions

View file

@ -76,7 +76,6 @@ class ServerConfigurationStructureService
'suspended' => (bool) $server->suspended,
'environment' => $this->environment->handle($server),
'build' => [
'oom_disabled' => $server->oom_disabled,
'memory' => $server->memory,
'swap' => $server->swap,
'io' => $server->io,
@ -90,6 +89,7 @@ class ServerConfigurationStructureService
],
'container' => [
'image' => $server->image,
'oom_disabled' => $server->oom_disabled,
'requires_rebuild' => false,
],
'allocations' => [
@ -97,11 +97,7 @@ class ServerConfigurationStructureService
'ip' => $server->allocation->ip,
'port' => $server->allocation->port,
],
'mappings' => [
$server->allocations->groupBy('ip')->map(function ($item) {
return $item->pluck('port');
})->toArray(),
],
'mappings' => [$server->getAllocationMappings()],
],
];
}