commit
7c1948ebd9
@ -34,11 +34,13 @@ public function handle()
|
|||||||
$this->cleanup_stucked_helper_containers();
|
$this->cleanup_stucked_helper_containers();
|
||||||
$this->call('cleanup:queue');
|
$this->call('cleanup:queue');
|
||||||
$this->call('cleanup:stucked-resources');
|
$this->call('cleanup:stucked-resources');
|
||||||
try {
|
if (!isCloud()) {
|
||||||
$server = Server::find(0)->first();
|
try {
|
||||||
$server->setupDynamicProxyConfiguration();
|
$server = Server::find(0)->first();
|
||||||
} catch (\Throwable $e) {
|
$server->setupDynamicProxyConfiguration();
|
||||||
echo "Could not setup dynamic configuration: {$e->getMessage()}\n";
|
} catch (\Throwable $e) {
|
||||||
|
echo "Could not setup dynamic configuration: {$e->getMessage()}\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$settings = InstanceSettings::get();
|
$settings = InstanceSettings::get();
|
||||||
|
@ -10,6 +10,7 @@ class ConfigureCloudflareTunnels extends Component
|
|||||||
{
|
{
|
||||||
public $server_id;
|
public $server_id;
|
||||||
public string $cloudflare_token;
|
public string $cloudflare_token;
|
||||||
|
public string $ssh_domain;
|
||||||
public function alreadyConfigured()
|
public function alreadyConfigured()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -28,6 +29,8 @@ public function submit()
|
|||||||
$server = Server::ownedByCurrentTeam()->where('id', $this->server_id)->firstOrFail();
|
$server = Server::ownedByCurrentTeam()->where('id', $this->server_id)->firstOrFail();
|
||||||
ConfigureCloudflared::run($server, $this->cloudflare_token);
|
ConfigureCloudflared::run($server, $this->cloudflare_token);
|
||||||
$server->settings->is_cloudflare_tunnel = true;
|
$server->settings->is_cloudflare_tunnel = true;
|
||||||
|
$server->ip = $this->ssh_domain;
|
||||||
|
$server->save();
|
||||||
$server->settings->save();
|
$server->settings->save();
|
||||||
$this->dispatch('success', 'Cloudflare Tunnels configured successfully.');
|
$this->dispatch('success', 'Cloudflare Tunnels configured successfully.');
|
||||||
$this->dispatch('serverInstalled');
|
$this->dispatch('serverInstalled');
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// The release version of your application
|
// The release version of your application
|
||||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
// 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
|
// When left empty or `null` the Laravel environment will be used
|
||||||
'environment' => config('app.env'),
|
'environment' => config('app.env'),
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return '4.0.0-beta.247';
|
return '4.0.0-beta.248';
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<form wire:submit.prevent='submit' class="flex flex-col w-full gap-2">
|
<form wire:submit.prevent='submit' class="flex flex-col w-full gap-2">
|
||||||
<x-forms.input id="cloudflare_token" required label="Cloudflare Token" />
|
<x-forms.input id="cloudflare_token" required label="Cloudflare Token" />
|
||||||
<x-forms.input id="ssh_domain" label="Configured SSH Domain" required
|
<x-forms.input id="ssh_domain" label="Configured SSH Domain" required
|
||||||
helper="ssh://localhost configured in Cloudflare" />
|
helper="The SSH Domain you configured in Cloudflare" />
|
||||||
<x-forms.button type="submit">Configure</x-forms.button>
|
<x-forms.button type="submit" isHighlighted @click="modalOpen=false">Automated Configuration (experimental)</x-forms.button>
|
||||||
<h3 class="text-center">Or</h3>
|
<h3 class="text-center">Or</h3>
|
||||||
<x-forms.button wire:click.prevent='alreadyConfigured' @click="modalOpen=false">I already configured the tunnel
|
<x-forms.button wire:click.prevent='alreadyConfigured' @click="modalOpen=false">I have already set up the tunnel manually on the server.</x-forms.button>
|
||||||
manually on the server</x-forms.button>
|
|
||||||
</form>
|
</form>
|
||||||
|
@ -80,13 +80,13 @@ class="w-full mt-8 mb-4 font-bold box-without-bg bg-coollabs hover:bg-coollabs-1
|
|||||||
<x-helper class="inline-flex"
|
<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><span class='dark:text-warning'>Coolify does not install or set up Cloudflare (cloudflared) on your server.</span>" />
|
||||||
</div>
|
</div>
|
||||||
{{-- @if ($server->settings->is_cloudflare_tunnel) --}}
|
@if ($server->settings->is_cloudflare_tunnel)
|
||||||
<x-forms.checkbox instantSave id="server.settings.is_cloudflare_tunnel"
|
<x-forms.checkbox instantSave id="server.settings.is_cloudflare_tunnel" label="Enabled" />
|
||||||
label="Enabled" />
|
@else
|
||||||
{{-- @endif --}}
|
<x-modal-input buttonTitle="Configure" title="Cloudflare Tunnels">
|
||||||
{{-- <x-modal-input buttonTitle="Configure" title="Cloudflare Tunnels">
|
<livewire:server.configure-cloudflare-tunnels :server_id="$server->id" />
|
||||||
<livewire:server.configure-cloudflare-tunnels :server_id="$server->id" />
|
</x-modal-input>
|
||||||
</x-modal-input> --}}
|
@endif
|
||||||
<h3 class="pt-6">Swarm <span class="text-xs text-neutral-500">(experimental)</span></h3>
|
<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'
|
<div class="pb-4">Read the docs <a class='underline dark:text-white'
|
||||||
href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>.
|
href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>.
|
||||||
@ -112,8 +112,19 @@ class="w-full mt-8 mb-4 font-bold box-without-bg bg-coollabs hover:bg-coollabs-1
|
|||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<x-forms.checkbox instantSave id="server.settings.is_cloudflare_tunnel"
|
<div class="flex items-center gap-1 pt-6">
|
||||||
label="Enabled" />
|
<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
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.247"
|
"version": "4.0.0-beta.248"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user