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
fix
Andras Bacsai8f0cd69cd300
diff --git a/app/Http/Livewire/Notifications/DiscordSettings.php b/app/Http/Livewire/Notifications/DiscordSettings.phpindex 504b60ac5f..e8ef7b94df 100644--- a/app/Http/Livewire/Notifications/DiscordSettings.php+++ b/app/Http/Livewire/Notifications/DiscordSettings.php@@ -4,7 +4,7 @@ namespace App\Http\Livewire\Notifications;use App\Models\Server;use App\Models\Team;-use App\Notifications\TestNotification;+use App\Notifications\Notifications\TestNotification;use Illuminate\Support\Facades\Notification;use Livewire\Component;diff --git a/app/Http/Livewire/Notifications/EmailSettings.php b/app/Http/Livewire/Notifications/EmailSettings.phpindex 2d97eccdc7..28ecd7aa26 100644--- a/app/Http/Livewire/Notifications/EmailSettings.php+++ b/app/Http/Livewire/Notifications/EmailSettings.php@@ -4,7 +4,7 @@ namespace App\Http\Livewire\Notifications;use App\Models\InstanceSettings;use App\Models\Team;-use App\Notifications\TestNotification;+use App\Notifications\Notifications\TestNotification;use Illuminate\Support\Facades\Notification;use Livewire\Component;diff --git a/app/Notifications/Channels/EmailChannel.php b/app/Notifications/Channels/EmailChannel.phpindex 4aa4b761fa..03fb46e2c8 100644--- a/app/Notifications/Channels/EmailChannel.php+++ b/app/Notifications/Channels/EmailChannel.php@@ -11,7 +11,7 @@ class EmailChannelpublic function send(SendsEmail $notifiable, Notification $notification): void{$this->bootConfigs($notifiable);- $is_test_notification = $notification instanceof \App\Notifications\TestNotification;+ $is_test_notification = $notification instanceof \App\Notifications\Notifications\TestNotification;if ($is_test_notification) {$bcc = $notifiable->routeNotificationForEmail('smtp_test_recipients');diff --git a/app/Notifications/TestNotification.php b/app/Notifications/Notifications/TestNotification.phpsimilarity index 90%rename from app/Notifications/TestNotification.phprename to app/Notifications/Notifications/TestNotification.phpindex bc207be88d..e953c3c61d 100644--- a/app/Notifications/TestNotification.php+++ b/app/Notifications/Notifications/TestNotification.php@@ -1,6 +1,6 @@<?php-namespace App\Notifications;+namespace App\Notifications\Notifications;use App\Notifications\Channels\EmailChannel;use App\Notifications\Channels\DiscordChannel;@@ -29,6 +29,6 @@ class TestNotification extends Notification implements ShouldQueuepublic function toDiscord(): string{- return 'You have successfully received a test Discord notification from Coolify. 🥳 [Go to your dashboard](' . url('/') . ')';+ return 'You have successfully received a test Discord notification from Coolify. 🥳 [Go to your dashboard](' . base_url() . ')';}}diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.phpindex 5d18256380..070a9572d0 100644--- a/database/seeders/ProductionSeeder.php+++ b/database/seeders/ProductionSeeder.php@@ -11,7 +11,6 @@ use App\Models\InstanceSettings;use App\Models\PrivateKey;use App\Models\Server;use App\Models\StandaloneDocker;-use App\Models\Team;use Illuminate\Database\Seeder;use Illuminate\Support\Facades\Process;use Illuminate\Support\Facades\Storage;@@ -46,15 +45,6 @@ class ProductionSeeder extends Seeder]);}- // Add first Team if it doesn't exist- // if (Team::find(0) == null) {- // Team::create([- // 'id' => 0,- // 'name' => "Root's Team",- // 'personal_team' => true,- // ]);- // }-// Save SSH Keys for the Coolify Host$coolify_key_name = "[email protected]";$coolify_key = Storage::disk('ssh-keys')->get("{$coolify_key_name}");@@ -107,19 +97,22 @@ class ProductionSeeder extends Seeder]);}try {- $ipv4 = Process::run('curl -4s https://ifconfig.io')->output();- $ipv4 = trim($ipv4);- $ipv4 = filter_var($ipv4, FILTER_VALIDATE_IP);$settings = InstanceSettings::get();- if (is_null($settings->public_ipv4) && $ipv4) {- $settings->update(['public_ipv4' => $ipv4]);+ if (is_null($settings->public_ipv4)) {+ $ipv4 = Process::run('curl -4s https://ifconfig.io')->output();+ if ($ipv4) {+ $ipv4 = trim($ipv4);+ $ipv4 = filter_var($ipv4, FILTER_VALIDATE_IP);+ $settings->update(['public_ipv4' => $ipv4]);+ }}- $ipv6 = Process::run('curl -6s https://ifconfig.io')->output();- $ipv6 = trim($ipv6);- $ipv6 = filter_var($ipv6, FILTER_VALIDATE_IP);- $settings = InstanceSettings::get();- if (is_null($settings->public_ipv6) && $ipv6) {- $settings->update(['public_ipv6' => $ipv6]);+ if (is_null($settings->public_ipv6)) {+ $ipv6 = Process::run('curl -6s https://ifconfig.io')->output();+ if ($ipv6) {+ $ipv6 = trim($ipv6);+ $ipv6 = filter_var($ipv6, FILTER_VALIDATE_IP);+ $settings->update(['public_ipv6' => $ipv6]);+ }}} catch (\Exception $e) {echo "Error: {$e->getMessage()}\n";diff --git a/database/seeders/ServerSeeder.php b/database/seeders/ServerSeeder.phpindex e60f7da7d9..9754be6134 100644--- a/database/seeders/ServerSeeder.php+++ b/database/seeders/ServerSeeder.php@@ -2,6 +2,7 @@namespace Database\Seeders;+use App\Actions\Proxy\InstallProxy;use App\Data\ServerMetadata;use App\Enums\ProxyStatus;use App\Enums\ProxyTypes;diff --git a/resources/views/livewire/notifications/email-settings.blade.php b/resources/views/livewire/notifications/email-settings.blade.phpindex f195be0b96..ed3034199c 100644--- a/resources/views/livewire/notifications/email-settings.blade.php+++ b/resources/views/livewire/notifications/email-settings.blade.php@@ -17,11 +17,11 @@</x-forms.button>@endif</div>- <div class="flex flex-col w-96">+ <div class="flex flex-col"><x-forms.checkbox instantSave id="model.extra_attributes.smtp_active" label="Notification Enabled" /></div>- <div class="flex gap-2">+ <div class="flex flex-col gap-2 xl:flex-row"><x-forms.input id="model.extra_attributes.smtp_recipients"placeholder="If empty, all users will be notified in the team."helper="Email list to send the all notifications to, separated by comma." label="Recipient(s)" />@@ -30,22 +30,22 @@helper="Email list to send the test notification to, separated by comma." /></div><div class="flex flex-col gap-2 xl:flex-row">- <div class="flex flex-col w-96">- <x-forms.input required id="model.extra_attributes.smtp_host" helper="SMTP Hostname"- placeholder="smtp.mailgun.org" label="Host" />- <x-forms.input required id="model.extra_attributes.smtp_port" helper="SMTP Port" placeholder="587"- label="Port" />- <x-forms.input helper="If SMTP through SSL, set it to 'tls'." placeholder="tls"- id="model.extra_attributes.smtp_encryption" label="Encryption" />- </div>- <div class="flex flex-col w-96">+ <x-forms.input required id="model.extra_attributes.smtp_host" helper="SMTP Hostname"+ placeholder="smtp.mailgun.org" label="Host" />+ <x-forms.input required id="model.extra_attributes.smtp_port" helper="SMTP Port" placeholder="587"+ label="Port" />+ <x-forms.input helper="If SMTP through SSL, set it to 'tls'." placeholder="tls"+ id="model.extra_attributes.smtp_encryption" label="Encryption" />+ </div>+ <div class="flex flex-col">+ <div class="flex flex-col gap-2 xl:flex-row"><x-forms.input id="model.extra_attributes.smtp_username" helper="SMTP Username" label="Username" /><x-forms.input type="password" helper="SMTP Password" id="model.extra_attributes.smtp_password"label="Password" />- <x-forms.input id="model.extra_attributes.smtp_timeout" helper="Timeout value for sending emails."- label="Timeout" /></div>- <div class="flex flex-col w-96">+ <x-forms.input id="model.extra_attributes.smtp_timeout" helper="Timeout value for sending emails."+ label="Timeout" />+ <div class="flex flex-col gap-2 xl:flex-row"><x-forms.input required id="model.extra_attributes.smtp_from_name" helper="Name used in emails."label="From Name" /><x-forms.input required id="model.extra_attributes.smtp_from_address"