2023-08-08 09:51:36 +00:00
@ php use App\Enums\ProxyTypes ; @ endphp
2023-07-28 11:31:47 +00:00
< div >
2023-07-14 11:38:24 +00:00
@ if ( $server -> settings -> is_usable )
2023-06-20 18:19:31 +00:00
@ if ( $server -> proxy -> type )
2023-07-28 12:44:26 +00:00
< div x - init = " $wire .load_proxy_configuration " >
2023-06-23 12:35:13 +00:00
@ if ( $selectedProxy -> value === 'TRAEFIK_V2' )
2023-07-28 12:44:26 +00:00
< form wire : submit . prevent = 'submit' >
2023-06-23 12:35:13 +00:00
< div class = " flex items-center gap-2 " >
< h2 > Proxy </ h2 >
< x - forms . button type = " submit " > Save </ x - forms . button >
@ if ( $server -> proxy -> status === 'exited' )
2023-07-28 12:44:26 +00:00
< x - forms . button wire : click . prevent = " change_proxy " > Switch Proxy </ x - forms . button >
2023-06-23 12:35:13 +00:00
@ endif
</ div >
< div class = " pt-3 pb-4 " > Traefik v2 </ div >
@ if (
$server -> proxy -> last_applied_settings &&
$server -> proxy -> last_saved_settings !== $server -> proxy -> last_applied_settings )
2023-07-28 14:42:28 +00:00
< div class = " text-red-500 " > Configuration out of sync . Restart the proxy to apply the new
configurations .
2023-06-23 12:35:13 +00:00
</ div >
@ endif
2023-07-14 11:01:55 +00:00
< div class = " container w-full pb-4 mx-auto " >
2023-08-09 15:57:27 +00:00
< livewire : activity - monitor header = " Logs " />
2023-06-23 12:35:13 +00:00
</ div >
2023-07-14 11:01:55 +00:00
< x - forms . input placeholder = " https://coolify.io " id = " redirect_url " label = " Default Redirect 404 "
2023-08-08 09:51:36 +00:00
helper = " All urls that has no service available will be redirected to this domain.<span class='text-helper'>You can set to your main marketing page or your social media link.</span> " />
2023-07-28 12:44:26 +00:00
< div wire : loading wire : target = " load_proxy_configuration " class = " pt-4 " >
2023-08-08 09:51:36 +00:00
< x - loading text = " Loading proxy configuration... " />
2023-06-23 12:35:13 +00:00
</ div >
2023-07-28 12:44:26 +00:00
< div wire : loading . remove wire : target = " load_proxy_configuration " >
2023-06-23 12:35:13 +00:00
@ if ( $proxy_settings )
< div class = " flex flex-col gap-2 pt-2 " >
2023-07-13 11:16:24 +00:00
< x - forms . textarea label = " Configuration file: traefik.conf " name = " proxy_settings "
2023-08-08 09:51:36 +00:00
wire : model . defer = " proxy_settings " rows = " 30 " />
2023-07-28 12:44:26 +00:00
< x - forms . button wire : click . prevent = " reset_proxy_configuration " >
2023-06-22 19:17:53 +00:00
Reset configuration to default
</ x - forms . button >
</ div >
2023-06-23 12:35:13 +00:00
@ endif
</ div >
</ form >
@ endif
2023-08-08 09:51:36 +00:00
@ else
< div >
< h2 > Proxy </ h2 >
< div class = " pt-2 pb-10 " > Select a proxy you would like to use on this server .</ div >
< div class = " flex gap-2 " >
< x - forms . button class = " w-32 box "
wire : click = " select_proxy(' { { ProxyTypes::TRAEFIK_V2 }}') " >
Traefik
v2
</ x - forms . button >
< x - forms . button disabled class = " w-32 box " >
Nginx
</ x - forms . button >
< x - forms . button disabled class = " w-32 box " >
Caddy
</ x - forms . button >
</ div >
2023-06-23 12:35:13 +00:00
</ div >
2023-08-08 09:51:36 +00:00
@ endif
@ else
< div > Server is not validated . Validate first .</ div >
@ endif
</ div >