2024-08-07 15:52:51 +00:00
@ php use App\Enums\ProxyTypes ; @ endphp
2023-07-28 11:31:47 +00:00
< div >
2024-03-12 11:45:55 +00:00
@ if ( $server -> proxyType ())
2023-10-11 09:00:40 +00:00
< div x - init = " $wire .loadProxyConfiguration " >
2024-03-11 14:08:05 +00:00
@ if ( $selectedProxy !== 'NONE' )
2023-12-07 18:06:32 +00:00
< form wire : submit = 'submit' >
2023-10-11 09:00:40 +00:00
< div class = " flex items-center gap-2 " >
< h2 > Configuration </ h2 >
2024-05-03 09:20:42 +00:00
@ if ( $server -> proxy -> status === 'exited' || $server -> proxy -> status === 'removing' )
2024-08-07 16:27:50 +00:00
< x - forms . button wire : click . prevent = " changeProxy " > Switch Proxy </ x - forms . button >
2024-03-11 14:08:05 +00:00
@ else
2024-08-07 16:27:50 +00:00
< x - forms . button disabled wire : click . prevent = " changeProxy " > Switch Proxy </ x - forms . button >
2023-06-23 12:35:13 +00:00
@ endif
2024-03-11 14:08:05 +00:00
< x - forms . button type = " submit " > Save </ x - forms . button >
2023-10-11 09:00:40 +00:00
</ div >
2024-03-25 09:41:44 +00:00
< div class = " pb-4 " > < svg class = " inline-flex w-6 h-6 mr-2 dark:text-warning " viewBox = " 0 0 256 256 "
2024-03-12 11:45:55 +00:00
xmlns = " http://www.w3.org/2000/svg " >
< path fill = " currentColor "
d = " M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16 " />
2024-03-27 10:07:29 +00:00
</ svg > Before switching proxies , please read < a class = " underline dark:text-white "
2024-06-25 12:29:51 +00:00
href = " https://coolify.io/docs/knowledge-base/server/proxies#switch-between-proxies " > this </ a >.
</ div >
2025-06-06 16:50:32 +00:00
< h3 > Advanced </ h3 >
2024-08-07 16:27:50 +00:00
< div class = " pb-4 w-96 " >
< x - forms . checkbox
helper = " If set, all resources will only have docker container labels for { { str( $server->proxyType ())->title() }}.<br>For applications, labels needs to be regenerated manually. <br>Resources needs to be restarted. "
id = " server.settings.generate_exact_labels "
label = " Generate labels only for { { str( $server->proxyType ())->title() }} " instantSave />
2024-12-06 12:39:28 +00:00
< x - forms . checkbox instantSave = " instantSaveRedirect " id = " redirect_enabled "
label = " Override default request handler "
2025-07-18 13:00:49 +00:00
helper = " Requests to unknown hosts or stopped services will receive a 503 response or be redirected to the URL you set below (need to enable this first). " />
2024-10-10 15:44:52 +00:00
@ if ( $redirect_enabled )
2024-12-06 12:39:28 +00:00
< x - forms . input placeholder = " https://app.coolify.io " id = " redirect_url "
label = " Redirect to (optional) " />
2024-10-10 15:44:52 +00:00
@ endif
</ div >
2024-08-07 15:52:51 +00:00
@ if ( $server -> proxyType () === ProxyTypes :: TRAEFIK -> value )
2025-06-06 16:50:32 +00:00
< h3 > Traefik </ h3 >
2024-03-11 14:08:05 +00:00
@ elseif ( $server -> proxyType () === 'CADDY' )
2025-06-06 16:50:32 +00:00
< h3 > Caddy </ h3 >
2024-03-11 14:08:05 +00:00
@ endif
2023-10-11 09:00:40 +00:00
@ if (
$server -> proxy -> last_applied_settings &&
$server -> proxy -> last_saved_settings !== $server -> proxy -> last_applied_settings )
< 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 >
2023-10-11 09:00:40 +00:00
@ endif
< div wire : loading wire : target = " loadProxyConfiguration " class = " pt-4 " >
< x - loading text = " Loading proxy configuration... " />
2023-09-06 13:00:56 +00:00
</ div >
2023-10-11 09:00:40 +00:00
< div wire : loading . remove wire : target = " loadProxyConfiguration " >
@ if ( $proxy_settings )
2024-03-04 09:46:53 +00:00
< div class = " flex flex-col gap-2 pt-4 " >
2024-06-25 12:29:51 +00:00
< x - forms . textarea useMonacoEditor monacoEditorLanguage = " yaml " label = " Configuration file "
name = " proxy_settings " id = " proxy_settings " rows = " 30 " />
2023-10-11 09:00:40 +00:00
< x - forms . button wire : click . prevent = " reset_proxy_configuration " >
Reset configuration to default
</ x - forms . button >
</ div >
@ endif
2023-09-25 07:17:42 +00:00
</ div >
2023-10-11 09:00:40 +00:00
</ form >
@ elseif ( $selectedProxy === 'NONE' )
< div class = " flex items-center gap-2 " >
< h2 > Configuration </ h2 >
2024-08-07 16:27:50 +00:00
< x - forms . button wire : click . prevent = " changeProxy " > Switch Proxy </ x - forms . button >
2023-10-11 09:00:40 +00:00
</ div >
2024-03-11 14:08:05 +00:00
< div class = " pt-2 pb-4 " > Custom ( None ) Proxy Selected </ div >
2023-08-11 18:19:42 +00:00
@ else
2023-10-11 09:00:40 +00:00
< div class = " flex items-center gap-2 " >
< h2 > Configuration </ h2 >
2024-08-07 16:27:50 +00:00
< x - forms . button wire : click . prevent = " changeProxy " > Switch Proxy </ x - forms . button >
2023-10-11 09:00:40 +00:00
</ div >
@ endif
@ else
< div >
< h2 > Configuration </ h2 >
< div class = " subtitle " > Select a proxy you would like to use on this server .</ div >
< div class = " grid gap-4 " >
2024-08-07 16:27:50 +00:00
< x - forms . button class = " box " wire : click = " selectProxy('NONE') " >
2023-10-11 09:00:40 +00:00
Custom ( None )
</ x - forms . button >
2024-08-07 16:27:50 +00:00
< x - forms . button class = " box " wire : click = " selectProxy('TRAEFIK') " >
2023-10-11 09:00:40 +00:00
Traefik
</ x - forms . button >
2024-08-07 16:27:50 +00:00
< x - forms . button class = " box " wire : click = " selectProxy('CADDY') " >
2024-07-25 09:07:18 +00:00
Caddy
2023-10-11 09:00:40 +00:00
</ x - forms . button >
2024-09-19 10:32:56 +00:00
{{ -- < x - forms . button disabled class = " box " >
2024-03-11 14:08:05 +00:00
Nginx
2024-09-19 10:32:56 +00:00
</ x - forms . button > -- }}
2023-08-11 18:19:42 +00:00
</ div >
2023-10-11 09:00:40 +00:00
</ div >
2023-08-11 18:19:42 +00:00
@ endif
</ div >