mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-20 02:17:09 +00:00
feat(v5): add dashboard ingress routing controls
Add V5 dashboard controls and validation for enabling server-backed app ingress, track generic ingress type/status fields, and improve Flux dispatch timeout/error handling.
This commit is contained in:
1 parent
ad0bcc8a4a
commit
1c091e9e36
22 files changed
+1120
-287
No files matched your search
@@ -136,7 +136,8 @@ class ApplyFluxResourceStatusUpdate
|
||||
}
|
||||
|
||||
$server->update([
|
||||
'caddy_ingress_status' => $status,
|
||||
'ingress_type' => 'caddy',
|
||||
'ingress_status' => $status,
|
||||
'last_status_check' => 'flux',
|
||||
'last_status_output' => $this->statusMessage($payload, 'Status updated by flux.'),
|
||||
'last_status_checked_at' => now(),
|
||||
|
||||
@@ -35,8 +35,6 @@ class GenerateCaddyIngressConfiguration
|
||||
'restart' => 'unless-stopped',
|
||||
'ports' => [
|
||||
'80:80',
|
||||
'443:443',
|
||||
'443:443/udp',
|
||||
],
|
||||
'volumes' => [
|
||||
'./Caddyfile:/etc/caddy/Caddyfile:ro',
|
||||
@@ -102,7 +100,7 @@ CADDY;
|
||||
$upstream = "{$application->container_name}.{$namespace}.coolify.internal:{$application->internal_port}";
|
||||
|
||||
return implode("\n", [
|
||||
"{$domain->domain} {",
|
||||
"http://{$domain->domain} {",
|
||||
" reverse_proxy {$upstream}",
|
||||
'}',
|
||||
]);
|
||||
|
||||
@@ -30,7 +30,10 @@ class StartCaddyIngress
|
||||
$output = $this->fluxClient->applyCaddyIngress($hostId, $configuration['caddyfile'], $configuration['apps']);
|
||||
|
||||
if ($server->exists) {
|
||||
$server->update(['caddy_ingress_status' => 'running']);
|
||||
$server->update([
|
||||
'ingress_type' => 'caddy',
|
||||
'ingress_status' => 'running',
|
||||
]);
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
||||
@@ -23,7 +23,7 @@ class StopCaddyIngress
|
||||
$output = $this->fluxClient->stopCaddyIngress($hostId);
|
||||
|
||||
if ($server->exists) {
|
||||
$server->update(['caddy_ingress_status' => 'exited']);
|
||||
$server->update(['ingress_status' => 'exited']);
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
||||
Reference in new issue
Block a user