diff --git a/app/Console/Commands/Init.php b/app/Console/Commands/Init.php index 66a4f1aff..acdff5b35 100644 --- a/app/Console/Commands/Init.php +++ b/app/Console/Commands/Init.php @@ -34,11 +34,13 @@ public function handle() $this->cleanup_stucked_helper_containers(); $this->call('cleanup:queue'); $this->call('cleanup:stucked-resources'); - try { - $server = Server::find(0)->first(); - $server->setupDynamicProxyConfiguration(); - } catch (\Throwable $e) { - echo "Could not setup dynamic configuration: {$e->getMessage()}\n"; + if (!isCloud()) { + try { + $server = Server::find(0)->first(); + $server->setupDynamicProxyConfiguration(); + } catch (\Throwable $e) { + echo "Could not setup dynamic configuration: {$e->getMessage()}\n"; + } } $settings = InstanceSettings::get(); diff --git a/app/Livewire/Server/ConfigureCloudflareTunnels.php b/app/Livewire/Server/ConfigureCloudflareTunnels.php index 7a07a4d04..03a48c3e1 100644 --- a/app/Livewire/Server/ConfigureCloudflareTunnels.php +++ b/app/Livewire/Server/ConfigureCloudflareTunnels.php @@ -10,6 +10,7 @@ class ConfigureCloudflareTunnels extends Component { public $server_id; public string $cloudflare_token; + public string $ssh_domain; public function alreadyConfigured() { try { @@ -28,6 +29,8 @@ public function submit() $server = Server::ownedByCurrentTeam()->where('id', $this->server_id)->firstOrFail(); ConfigureCloudflared::run($server, $this->cloudflare_token); $server->settings->is_cloudflare_tunnel = true; + $server->ip = $this->ssh_domain; + $server->save(); $server->settings->save(); $this->dispatch('success', 'Cloudflare Tunnels configured successfully.'); $this->dispatch('serverInstalled'); diff --git a/config/sentry.php b/config/sentry.php index 0958a5e3c..89345d082 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.247', + 'release' => '4.0.0-beta.248', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index c5f90b65a..642ee812d 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ - Configure + helper="The SSH Domain you configured in Cloudflare" /> + Automated Configuration (experimental)

Or

- I already configured the tunnel - manually on the server + I have already set up the tunnel manually on the server. diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index 0265a1098..48c00d6f9 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -80,13 +80,13 @@ class="w-full mt-8 mb-4 font-bold box-without-bg bg-coollabs hover:bg-coollabs-1 - {{-- @if ($server->settings->is_cloudflare_tunnel) --}} - - {{-- @endif --}} - {{-- - - --}} + @if ($server->settings->is_cloudflare_tunnel) + + @else + + + + @endif

Swarm (experimental)

Read the docs here. @@ -112,8 +112,19 @@ class="w-full mt-8 mb-4 font-bold box-without-bg bg-coollabs hover:bg-coollabs-1 @endif @endif @else - +
+

Cloudflare Tunnels +

+ +
+ @if ($server->settings->is_cloudflare_tunnel) + + @else + + + + @endif @endif
diff --git a/versions.json b/versions.json index 851d1965a..80acebb25 100644 --- a/versions.json +++ b/versions.json @@ -1,7 +1,7 @@ { "coolify": { "v4": { - "version": "4.0.0-beta.247" + "version": "4.0.0-beta.248" } } }