Add load balancer (#453)

This commit is contained in:
Saeed Vaziry
2025-01-30 23:52:51 +01:00
committed by GitHub
parent 53e20cbc2a
commit 6966f06b1a
54 changed files with 3128 additions and 1833 deletions

View File

@ -24,6 +24,9 @@ public function edit(Server $server, array $input): Server
}
$server->ip = $input['ip'];
}
if (isset($input['local_ip'])) {
$server->local_ip = $input['local_ip'];
}
if (isset($input['port'])) {
if ($server->port !== $input['port']) {
$checkConnection = true;
@ -52,6 +55,10 @@ public static function rules(Server $server): array
new RestrictedIPAddressesRule,
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
],
'local_ip' => [
'string',
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
],
'port' => [
'integer',
'min:1',