From 0d3d5f40fdd640a70e379ad83430663d42f6f227 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:58:52 +0200 Subject: [PATCH 1/3] Fix: Css issue with advanced settings and remove cf tunnel in onboarding --- .../views/livewire/boarding/index.blade.php | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php index 7b7ef8c12..e5b2a5b06 100644 --- a/resources/views/livewire/boarding/index.blade.php +++ b/resources/views/livewire/boarding/index.blade.php @@ -273,27 +273,23 @@ Please let me know your server details. -
-
- - -
-
- -
+ + + +
-
+
-
+
Non-root user is @@ -303,11 +299,6 @@
-
- -
Continue From 9310af0301a62a99c441837d77a28428f6d9238a Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:50:22 +0200 Subject: [PATCH 2/3] Feat: New cf tunnel install flow --- app/Livewire/Server/Form.php | 8 ++ .../configure-cloudflare-tunnels.blade.php | 4 +- .../views/livewire/server/form.blade.php | 96 +++++++++---------- 3 files changed, 55 insertions(+), 53 deletions(-) diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php index 3b3747a81..ddf2b6ccb 100644 --- a/app/Livewire/Server/Form.php +++ b/app/Livewire/Server/Form.php @@ -238,4 +238,12 @@ class Form extends Component $this->server->settings->save(); $this->dispatch('success', 'Server timezone updated.'); } + + public function manualCloudflareConfig() + { + $this->server->settings->is_cloudflare_tunnel = true; + $this->server->settings->save(); + $this->server->refresh(); + $this->dispatch('success', 'Cloudflare Tunnels enabled.'); + } } diff --git a/resources/views/livewire/server/configure-cloudflare-tunnels.blade.php b/resources/views/livewire/server/configure-cloudflare-tunnels.blade.php index 4aaf9203f..509d57d1f 100644 --- a/resources/views/livewire/server/configure-cloudflare-tunnels.blade.php +++ b/resources/views/livewire/server/configure-cloudflare-tunnels.blade.php @@ -2,7 +2,5 @@ - Automated Configuration (experimental) -

Or

- I have already set up the tunnel manually on the server. + Automated Configuration diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index d2c60f701..e939e6541 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -117,65 +117,61 @@
-
- @if ($server->isFunctional()) - @if (!$server->isLocalhost()) - -
-

Cloudflare Tunnels -

+
+ @if (!$server->isLocalhost()) + +
+
+

Cloudflare Tunnels

+ helper="If you are using Cloudflare Tunnels, enable this. It will proxy all SSH requests to your server through Cloudflare.
You then can close your server's SSH port in the firewall of your hosting provider.
If you choose manual configuration, Coolify does not install or set up Cloudflare (cloudflared) on your server." />
@if ($server->settings->is_cloudflare_tunnel) - @else - + @elseif (!$server->isFunctional()) +
+

Please validate the server first. The SSH port needs to be open in the firewall on your hosting provider that coolify can validate the server and automatically configure cloudflare tunnels.

+

For more information, please read our Documentation.

+
+ @endif + @if (!$server->settings->is_cloudflare_tunnel && $server->isFunctional()) + @endif - @if (!$server->isBuildServer()) -

Swarm (experimental)

-
Read the docs here. -
- @if ($server->settings->is_swarm_worker) - - @else - - @endif - - @if ($server->settings->is_swarm_manager) - - @else - - @endif + @if (!$server->settings->is_cloudflare_tunnel) + + I have configured Cloudflare Tunnels manually + @endif - @endif - @else -
-

Cloudflare Tunnels -

-
- @if ($server->settings->is_cloudflare_tunnel) - - @else - - - + @if (!$server->isBuildServer()) +

Swarm (experimental)

+
Read the docs here. +
+ @if ($server->settings->is_swarm_worker) + + @else + + @endif + + @if ($server->settings->is_swarm_manager) + + @else + + @endif @endif @endif
From b9b33c831c767434ef4664b56db0a988b61fd7ff Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:17:19 +0200 Subject: [PATCH 3/3] Fix: Made help text more clear --- resources/views/livewire/server/form.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index e939e6541..ce33c7524 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -131,7 +131,7 @@ @elseif (!$server->isFunctional())
-

Please validate the server first. The SSH port needs to be open in the firewall on your hosting provider that coolify can validate the server and automatically configure cloudflare tunnels.

+

Please select manual cloudflare tunnel configuration (first then hit validate server) or validate the server first and then you can select automatic configuration.

For more information, please read our Documentation.

@endif