commit
f7ed98d6b7
@ -21,7 +21,7 @@ class Form extends Component
|
|||||||
'server.port' => 'required',
|
'server.port' => 'required',
|
||||||
'server.settings.is_reachable' => 'required',
|
'server.settings.is_reachable' => 'required',
|
||||||
'server.settings.is_part_of_swarm' => 'required',
|
'server.settings.is_part_of_swarm' => 'required',
|
||||||
'wildcard_domain' => 'nullable|string'
|
'wildcard_domain' => 'nullable|url',
|
||||||
];
|
];
|
||||||
protected $validationAttributes = [
|
protected $validationAttributes = [
|
||||||
'server.name' => 'name',
|
'server.name' => 'name',
|
||||||
|
@ -23,13 +23,11 @@ class Configuration extends Component
|
|||||||
'settings.fqdn' => 'nullable',
|
'settings.fqdn' => 'nullable',
|
||||||
'settings.public_port_min' => 'required',
|
'settings.public_port_min' => 'required',
|
||||||
'settings.public_port_max' => 'required',
|
'settings.public_port_max' => 'required',
|
||||||
'settings.default_redirect_404' => 'nullable',
|
|
||||||
];
|
];
|
||||||
protected $validationAttributes = [
|
protected $validationAttributes = [
|
||||||
'settings.fqdn' => 'FQDN',
|
'settings.fqdn' => 'FQDN',
|
||||||
'settings.public_port_min' => 'Public port min',
|
'settings.public_port_min' => 'Public port min',
|
||||||
'settings.public_port_max' => 'Public port max',
|
'settings.public_port_max' => 'Public port max',
|
||||||
'settings.default_redirect_404' => 'Default redirect 404',
|
|
||||||
];
|
];
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
@ -139,8 +137,7 @@ public function submit()
|
|||||||
|
|
||||||
$this->server = Server::findOrFail(0);
|
$this->server = Server::findOrFail(0);
|
||||||
$this->setup_instance_fqdn();
|
$this->setup_instance_fqdn();
|
||||||
setup_default_redirect_404(redirect_url: $this->settings->default_redirect_404, server: $this->server);
|
if ($this->settings->fqdn) {
|
||||||
if ($this->settings->fqdn || $this->settings->default_redirect_404) {
|
|
||||||
dispatch(new InstanceProxyCheckJob());
|
dispatch(new InstanceProxyCheckJob());
|
||||||
}
|
}
|
||||||
$this->emit('success', 'Instance settings updated successfully!');
|
$this->emit('success', 'Instance settings updated successfully!');
|
||||||
|
@ -24,7 +24,7 @@ class DeployedWithErrorNotification extends Notification implements ShouldQueue
|
|||||||
public string|null $deployment_url = null;
|
public string|null $deployment_url = null;
|
||||||
public string $project_uuid;
|
public string $project_uuid;
|
||||||
public string $environment_name;
|
public string $environment_name;
|
||||||
public string $fqdn;
|
public string|null $fqdn;
|
||||||
|
|
||||||
public function __construct(Application $application, string $deployment_uuid, ApplicationPreview|null $preview)
|
public function __construct(Application $application, string $deployment_uuid, ApplicationPreview|null $preview)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return '4.0.0-beta.13';
|
return '4.0.0-beta.14';
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('instance_settings', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('default_redirect_404');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('instance_settings', function (Blueprint $table) {
|
||||||
|
$table->string('default_redirect_404')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
@ -1 +1,6 @@
|
|||||||
<span {{ $attributes->class(['bg-warning loading', 'loading-spinner' => !$attributes->has('class')]) }}></span>
|
@props(['text' => null])
|
||||||
|
<span class="flex items-center gap-4 text-white">
|
||||||
|
{{ $text }}<span
|
||||||
|
{{ $attributes->class(['bg-warning loading', 'loading-spinner' => !$attributes->has('class')]) }}>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
<div class="flex flex-col w-full gap-2 lg:flex-row">
|
<div class="flex flex-col w-full gap-2 lg:flex-row">
|
||||||
<x-forms.input id="server.name" label="Name" required />
|
<x-forms.input id="server.name" label="Name" required />
|
||||||
<x-forms.input id="server.description" label="Description" />
|
<x-forms.input id="server.description" label="Description" />
|
||||||
<x-forms.input id="wildcard_domain" label="Wildcard Domain"
|
<x-forms.input placeholder="https://example.com" id="wildcard_domain" label="Wildcard Domain"
|
||||||
helper="Wildcard domain for your applications. If you set this, you will get a random generated domain for your new applications.<br><span class='font-bold text-white'>Example</span>In case you set:<span class='text-helper'>https://example.com</span>your applications will get: <span class='text-helper'>https://randomId.example.com</span>" />
|
helper="Wildcard domain for your applications. If you set this, you will get a random generated domain for your new applications.<br><span class='font-bold text-white'>Example</span>In case you set:<span class='text-helper'>https://example.com</span>your applications will get: <span class='text-helper'>https://randomId.example.com</span>" />
|
||||||
|
|
||||||
{{-- <x-forms.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
|
{{-- <x-forms.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
|
||||||
label="Is it part of a Swarm cluster?" /> --}}
|
label="Is it part of a Swarm cluster?" /> --}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,67 +4,64 @@
|
|||||||
@if ($server->settings->is_reachable)
|
@if ($server->settings->is_reachable)
|
||||||
@if ($server->proxy->type)
|
@if ($server->proxy->type)
|
||||||
<div x-init="$wire.checkProxySettingsInSync">
|
<div x-init="$wire.checkProxySettingsInSync">
|
||||||
<div wire:loading wire:target="checkProxySettingsInSync">
|
@if ($selectedProxy->value === 'TRAEFIK_V2')
|
||||||
<x-loading />
|
<form wire:submit.prevent='saveConfiguration'>
|
||||||
</div>
|
<div class="flex items-center gap-2">
|
||||||
<div wire:loading.remove>
|
<h2>Proxy</h2>
|
||||||
@if ($proxy_settings)
|
<x-forms.button type="submit">Save</x-forms.button>
|
||||||
@if ($selectedProxy->value === 'TRAEFIK_V2')
|
@if ($server->proxy->status === 'exited')
|
||||||
<form wire:submit.prevent='saveConfiguration'>
|
<x-forms.button wire:click.prevent="switchProxy">Switch Proxy</x-forms.button>
|
||||||
<div class="flex items-center gap-2">
|
@endif
|
||||||
<h2>Proxy</h2>
|
<livewire:server.proxy.status :server="$server" />
|
||||||
<x-forms.button type="submit">Save</x-forms.button>
|
</div>
|
||||||
@if ($server->proxy->status === 'exited')
|
|
||||||
<x-forms.button wire:click.prevent="switchProxy">Switch Proxy</x-forms.button>
|
<div class="pt-3 pb-4 ">Traefik v2</div>
|
||||||
@endif
|
@if (
|
||||||
<livewire:server.proxy.status :server="$server" />
|
$server->proxy->last_applied_settings &&
|
||||||
</div>
|
$server->proxy->last_saved_settings !== $server->proxy->last_applied_settings)
|
||||||
<div class="pt-3 pb-4 ">Traefik v2</div>
|
<div class="text-red-500 ">Configuration out of sync. Restart to get the new
|
||||||
@if (
|
configs.
|
||||||
$server->proxy->last_applied_settings &&
|
</div>
|
||||||
$server->proxy->last_saved_settings !== $server->proxy->last_applied_settings)
|
@endif
|
||||||
<div class="text-red-500 ">Configuration out of sync. Restart to get the new
|
<x-forms.input placeholder="https://coolify.io" id="redirect_url" label="Default Redirect 404"
|
||||||
configs.
|
helper="All urls that has no service available will be redirected to this domain.<span class='text-helper'>You can set to your main marketing page or your social media link.</span>" />
|
||||||
</div>
|
<div class="container w-full mx-auto">
|
||||||
@endif
|
<livewire:activity-monitor :header="true" />
|
||||||
@if ($server->id !== 0)
|
</div>
|
||||||
<x-forms.input id="redirect_url" label="Default redirect"
|
<div wire:loading wire:target="checkProxySettingsInSync" class="pt-4">
|
||||||
placeholder="https://coolify.io" />
|
<x-loading text="Loading proxy configuration..." />
|
||||||
@endif
|
</div>
|
||||||
<div class="container w-full mx-auto">
|
<div wire:loading.remove wire:target="checkProxySettingsInSync">
|
||||||
<livewire:activity-monitor :header="true" />
|
@if ($proxy_settings)
|
||||||
</div>
|
<div class="flex flex-col gap-2 pt-2">
|
||||||
<div class="flex flex-col gap-2">
|
|
||||||
<x-forms.textarea label="Configuration file: traefik.conf" class="text-xs" noDirty
|
<x-forms.textarea label="Configuration file: traefik.conf" class="text-xs" noDirty
|
||||||
name="proxy_settings" wire:model.defer="proxy_settings" rows="30" />
|
name="proxy_settings" wire:model.defer="proxy_settings" rows="30" />
|
||||||
<x-forms.button wire:click.prevent="resetProxy">
|
<x-forms.button wire:click.prevent="resetProxy">
|
||||||
Reset configuration to default
|
Reset configuration to default
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
@endif
|
||||||
@endif
|
</div>
|
||||||
@else
|
</form>
|
||||||
<div class="">Server is not validated. Validate first.</div>
|
@endif
|
||||||
@endif
|
@else
|
||||||
|
<div>
|
||||||
|
<h2>Proxy</h2>
|
||||||
|
<div class="pt-2 pb-10 ">Select a proxy you would like to use on this server.</div>
|
||||||
|
<div class="flex gap-2">
|
||||||
|
<x-forms.button class="w-32 box"
|
||||||
|
wire:click="setProxy('{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}')">
|
||||||
|
Traefik
|
||||||
|
v2
|
||||||
|
</x-forms.button>
|
||||||
|
<x-forms.button disabled class="w-32 box">
|
||||||
|
Nginx
|
||||||
|
</x-forms.button>
|
||||||
|
<x-forms.button disabled class="w-32 box">
|
||||||
|
Caddy
|
||||||
|
</x-forms.button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@else
|
|
||||||
<div>
|
|
||||||
<h2>Proxy</h2>
|
|
||||||
<div class="pt-2 pb-10 ">Select a proxy you would like to use on this server.</div>
|
|
||||||
<div class="flex gap-2">
|
|
||||||
<x-forms.button class="w-32 box" wire:click="setProxy('{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}')">
|
|
||||||
Traefik
|
|
||||||
v2
|
|
||||||
</x-forms.button>
|
|
||||||
<x-forms.button disabled class="w-32 box">
|
|
||||||
Nginx
|
|
||||||
</x-forms.button>
|
|
||||||
<x-forms.button disabled class="w-32 box">
|
|
||||||
Caddy
|
|
||||||
</x-forms.button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<div class="">Server is not validated. Validate first.</div>
|
<div class="">Server is not validated. Validate first.</div>
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input id="settings.fqdn" label="Coolify's Domain" />
|
<x-forms.input id="settings.fqdn" label="Coolify's Domain" />
|
||||||
<x-forms.input id="settings.default_redirect_404" label="Default Redirect 404"
|
|
||||||
helper="All urls that has no service available will be redirected to this domain.<span class='text-helper'>You can set to your main marketing page or your social media link.</span>" />
|
|
||||||
</div>
|
</div>
|
||||||
{{-- <div class="flex gap-2 ">
|
{{-- <div class="flex gap-2 ">
|
||||||
<x-forms.input type="number" id="settings.public_port_min" label="Public Port Min" />
|
<x-forms.input type="number" id="settings.public_port_min" label="Public Port Min" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## Do not modify this file. You will lost the ability to installation and autoupdate!
|
## Do not modify this file. You will lose the ability to install and auto-update!
|
||||||
|
|
||||||
###########
|
###########
|
||||||
## Always run "php artisan app:sync-to-bunny-cdn --env=secrets" or "scripts/run sync-bunny" if you update this file.
|
## Always run "php artisan app:sync-to-bunny-cdn --env=secrets" or "scripts/run sync-bunny" if you update this file.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"version": "3.12.32"
|
"version": "3.12.32"
|
||||||
},
|
},
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.13"
|
"version": "4.0.0-beta.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user