Feat: New cf tunnel install flow
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,5 @@
|
||||
<x-forms.input id="cloudflare_token" required label="Cloudflare Token" />
|
||||
<x-forms.input id="ssh_domain" label="Configured SSH Domain" required
|
||||
helper="The SSH Domain you configured in Cloudflare" />
|
||||
<x-forms.button type="submit" isHighlighted @click="modalOpen=false">Automated Configuration (experimental)</x-forms.button>
|
||||
<h3 class="text-center">Or</h3>
|
||||
<x-forms.button wire:click.prevent='alreadyConfigured' @click="modalOpen=false">I have already set up the tunnel manually on the server.</x-forms.button>
|
||||
<x-forms.button type="submit" isHighlighted @click="modalOpen=false">Automated Configuration</x-forms.button>
|
||||
</form>
|
||||
|
@@ -117,24 +117,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-64">
|
||||
@if ($server->isFunctional())
|
||||
<div class="w-96">
|
||||
@if (!$server->isLocalhost())
|
||||
<x-forms.checkbox instantSave id="server.settings.is_build_server"
|
||||
label="Use it as a build server?" />
|
||||
<div class="flex items-center gap-1 pt-6">
|
||||
<h3 class="">Cloudflare Tunnels
|
||||
</h3>
|
||||
<div class="flex flex-col gap-2 pt-6">
|
||||
<div class="flex items-center gap-1">
|
||||
<h3 class="text-lg font-semibold">Cloudflare Tunnels</h3>
|
||||
<x-helper class="inline-flex"
|
||||
helper="If you are using Cloudflare Tunnels, enable this. It will proxy all SSH requests to your server through Cloudflare.<br><span class='dark:text-warning'>Coolify does not install or set up Cloudflare (cloudflared) on your server.</span>" />
|
||||
helper="If you are using Cloudflare Tunnels, enable this. It will proxy all SSH requests to your server through Cloudflare.<br> You then can close your server's SSH port in the firewall of your hosting provider.<br><span class='dark:text-warning'>If you choose manual configuration, Coolify does not install or set up Cloudflare (cloudflared) on your server.</span>" />
|
||||
</div>
|
||||
@if ($server->settings->is_cloudflare_tunnel)
|
||||
<x-forms.checkbox instantSave id="server.settings.is_cloudflare_tunnel" label="Enabled" />
|
||||
@else
|
||||
<x-modal-input buttonTitle="Configure" title="Cloudflare Tunnels">
|
||||
@elseif (!$server->isFunctional())
|
||||
<div class="p-4 mb-4 text-sm text-yellow-800 bg-yellow-100 rounded-lg dark:bg-yellow-900 dark:text-yellow-300">
|
||||
<p>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.</p>
|
||||
<p class="mt-2">For more information, please read our <a href="https://coolify.io/docs/knowledge-base/cloudflare/tunnels/" target="_blank" class="font-medium underline hover:text-yellow-600 dark:hover:text-yellow-200">Documentation</a>.</p>
|
||||
</div>
|
||||
@endif
|
||||
@if (!$server->settings->is_cloudflare_tunnel && $server->isFunctional())
|
||||
<x-modal-input buttonTitle="Automatic Configuration" title="Cloudflare Tunnels" class="w-full">
|
||||
<livewire:server.configure-cloudflare-tunnels :server_id="$server->id" />
|
||||
</x-modal-input>
|
||||
@endif
|
||||
@if (!$server->settings->is_cloudflare_tunnel)
|
||||
<x-forms.button wire:click="manualCloudflareConfig" class="w-full">
|
||||
I have configured Cloudflare Tunnels manually
|
||||
</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
@if (!$server->isBuildServer())
|
||||
<h3 class="pt-6">Swarm <span class="text-xs text-neutral-500">(experimental)</span></h3>
|
||||
<div class="pb-4">Read the docs <a class='underline dark:text-white'
|
||||
@@ -163,21 +174,6 @@
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
@else
|
||||
<div class="flex items-center gap-1 pt-6">
|
||||
<h3 class="">Cloudflare Tunnels
|
||||
</h3>
|
||||
<x-helper class="inline-flex"
|
||||
helper="If you are using Cloudflare Tunnels, enable this. It will proxy all SSH requests to your server through Cloudflare.<br><span class='dark:text-warning'>Coolify does not install or set up Cloudflare (cloudflared) on your server.</span>" />
|
||||
</div>
|
||||
@if ($server->settings->is_cloudflare_tunnel)
|
||||
<x-forms.checkbox instantSave id="server.settings.is_cloudflare_tunnel" label="Enabled" />
|
||||
@else
|
||||
<x-modal-input buttonTitle="Configure" title="Cloudflare Tunnels">
|
||||
<livewire:server.configure-cloudflare-tunnels :server_id="$server->id" />
|
||||
</x-modal-input>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user