feat: fully functional terminal for command center

This commit is contained in:
Luan Estradioto
2024-06-25 15:29:33 -03:00
parent fcfbba4dc6
commit c2ea8996ee
15 changed files with 624 additions and 57 deletions

View File

@@ -295,6 +295,13 @@ respond 404
'service' => 'coolify-realtime',
'rule' => "Host(`{$host}`) && PathPrefix(`/app`)",
],
'coolify-terminal-ws' => [
'entryPoints' => [
0 => 'http',
],
'service' => 'coolify-terminal',
'rule' => "Host(`{$host}`) && PathPrefix(`/terminal`)",
],
],
'services' => [
'coolify' => [
@@ -315,6 +322,15 @@ respond 404
],
],
],
'coolify-terminal' => [
'loadBalancer' => [
'servers' => [
0 => [
'url' => 'http://coolify-terminal:6002',
],
],
],
],
],
],
];
@@ -344,6 +360,16 @@ respond 404
'certresolver' => 'letsencrypt',
],
];
$traefik_dynamic_conf['http']['routers']['coolify-terminal-wss'] = [
'entryPoints' => [
0 => 'https',
],
'service' => 'coolify-terminal',
'rule' => "Host(`{$host}`) && PathPrefix(`/terminal`)",
'tls' => [
'certresolver' => 'letsencrypt',
],
];
}
$yaml = Yaml::dump($traefik_dynamic_conf, 12, 2);
$yaml =
@@ -377,6 +403,9 @@ $schema://$host {
handle /app/* {
reverse_proxy coolify-realtime:6001
}
handle /terminal/* {
reverse_proxy coolify-terminal:6002
}
reverse_proxy coolify:80
}";
$base64 = base64_encode($caddy_file);