An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Remove instance 404 redirect
Andras Bacsai0bade9add30e
diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.phpindex 44a94e31e6..72d32243ff 100644--- a/app/Http/Livewire/Server/Form.php+++ b/app/Http/Livewire/Server/Form.php@@ -21,7 +21,7 @@ class Form extends Component'server.port' => 'required','server.settings.is_reachable' => 'required','server.settings.is_part_of_swarm' => 'required',- 'wildcard_domain' => 'nullable|string'+ 'wildcard_domain' => 'nullable|url',];protected $validationAttributes = ['server.name' => 'name',diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.phpindex 4746cf2993..d0ce9435e2 100644--- a/app/Http/Livewire/Settings/Configuration.php+++ b/app/Http/Livewire/Settings/Configuration.php@@ -23,13 +23,11 @@ class Configuration extends Component'settings.fqdn' => 'nullable','settings.public_port_min' => 'required','settings.public_port_max' => 'required',- 'settings.default_redirect_404' => 'nullable',];protected $validationAttributes = ['settings.fqdn' => 'FQDN','settings.public_port_min' => 'Public port min','settings.public_port_max' => 'Public port max',- 'settings.default_redirect_404' => 'Default redirect 404',];public function mount(){@@ -139,8 +137,7 @@ class Configuration extends Component$this->server = Server::findOrFail(0);$this->setup_instance_fqdn();- setup_default_redirect_404(redirect_url: $this->settings->default_redirect_404, server: $this->server);- if ($this->settings->fqdn || $this->settings->default_redirect_404) {+ if ($this->settings->fqdn) {dispatch(new InstanceProxyCheckJob());}$this->emit('success', 'Instance settings updated successfully!');diff --git a/app/Notifications/Notifications/Application/DeployedWithErrorNotification.php b/app/Notifications/Notifications/Application/DeployedWithErrorNotification.phpindex ef4c81770a..1418b7e8e5 100644--- a/app/Notifications/Notifications/Application/DeployedWithErrorNotification.php+++ b/app/Notifications/Notifications/Application/DeployedWithErrorNotification.php@@ -24,7 +24,7 @@ class DeployedWithErrorNotification extends Notification implements ShouldQueuepublic string|null $deployment_url = null;public string $project_uuid;public string $environment_name;- public string $fqdn;+ public string|null $fqdn;public function __construct(Application $application, string $deployment_uuid, ApplicationPreview|null $preview){diff --git a/config/version.php b/config/version.phpindex 300506ef50..b343fad81e 100644--- a/config/version.php+++ b/config/version.php@@ -1,3 +1,3 @@<?php-return '4.0.0-beta.13';+return '4.0.0-beta.14';diff --git a/database/migrations/2023_06_23_114132_remove_default_redirect_from_instance_settings.php b/database/migrations/2023_06_23_114132_remove_default_redirect_from_instance_settings.phpnew file mode 100644index 0000000000..9c14b7c398--- /dev/null+++ b/database/migrations/2023_06_23_114132_remove_default_redirect_from_instance_settings.php@@ -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();+ });+ }+};diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.phpindex d6d02489fc..4a88910acc 100644--- a/resources/views/livewire/server/form.blade.php+++ b/resources/views/livewire/server/form.blade.php@@ -16,9 +16,8 @@<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.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>" />-{{-- <x-forms.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"label="Is it part of a Swarm cluster?" /> --}}</div>diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.phpindex c009183c4f..42b62c6ff5 100644--- a/resources/views/livewire/server/proxy.blade.php+++ b/resources/views/livewire/server/proxy.blade.php@@ -27,10 +27,9 @@configs.</div>@endif- @if ($server->id !== 0)- <x-forms.input id="redirect_url" label="Default redirect"- placeholder="https://coolify.io" />- @endif+ <x-forms.input placeholder="https://coolify.io" id="redirect_url"+ 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 class="container w-full mx-auto"><livewire:activity-monitor :header="true" /></div>diff --git a/resources/views/livewire/settings/configuration.blade.php b/resources/views/livewire/settings/configuration.blade.phpindex fa2736e1e3..2a52c11167 100644--- a/resources/views/livewire/settings/configuration.blade.php+++ b/resources/views/livewire/settings/configuration.blade.php@@ -9,8 +9,6 @@<div class="flex flex-col gap-2"><div class="flex gap-2"><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 class="flex gap-2 "><x-forms.input type="number" id="settings.public_port_min" label="Public Port Min" />diff --git a/versions.json b/versions.jsonindex 1b4ae8856f..8baf727d03 100644--- a/versions.json+++ b/versions.json@@ -4,7 +4,7 @@"version": "3.12.32"},"v4": {- "version": "4.0.0-beta.13"+ "version": "4.0.0-beta.14"}}}\ No newline at end of file