diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 8a52ffebc..6e81f993d 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -21,6 +21,6 @@ body: - type: input attributes: label: Version - description: Coolify's version (see bottom left corner). + description: Coolify's version (see top of your screen). validations: required: true diff --git a/app/Console/Commands/CleanupDatabase.php b/app/Console/Commands/CleanupDatabase.php index 495b365ee..9e3a58a7e 100644 --- a/app/Console/Commands/CleanupDatabase.php +++ b/app/Console/Commands/CleanupDatabase.php @@ -20,7 +20,7 @@ public function handle() $keep_days = 60; echo "Keep days: $keep_days\n"; // Cleanup failed jobs table - $failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(7)); + $failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(1)); $count = $failed_jobs->count(); echo "Delete $count entries from failed_jobs.\n"; if ($this->option('yes')) { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d43da9cbe..dbb8e6ead 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -48,9 +48,7 @@ protected function schedule(Schedule $schedule): void $this->pull_helper_image($schedule); $this->check_scheduled_tasks($schedule); - if (!isCloud()) { - $schedule->command('cleanup:database --yes')->daily(); - } + $schedule->command('cleanup:database --yes')->daily(); } } private function pull_helper_image($schedule) @@ -72,43 +70,14 @@ private function check_resources($schedule) $containerServers = $servers->where('settings.is_swarm_worker', false)->where('settings.is_build_server', false); } foreach ($containerServers as $server) { - $schedule->job(new ContainerStatusJob($server))->everyMinute()->onOneServer(); + $schedule->job(new ContainerStatusJob($server))->everyTwoMinutes()->onOneServer(); if ($server->isLogDrainEnabled()) { - $schedule->job(new CheckLogDrainContainerJob($server))->everyMinute()->onOneServer(); + $schedule->job(new CheckLogDrainContainerJob($server))->everyTwoMinutes()->onOneServer(); } } foreach ($servers as $server) { - $schedule->job(new ServerStatusJob($server))->everyMinute()->onOneServer(); + $schedule->job(new ServerStatusJob($server))->everyTwoMinutes()->onOneServer(); } - // Delayed Jobs - // foreach ($containerServers as $server) { - // $schedule - // ->call(function () use ($server) { - // $randomSeconds = rand(1, 40); - // $job = new ContainerStatusJob($server); - // $job->delay($randomSeconds); - // ray('dispatching container status job in ' . $randomSeconds . ' seconds'); - // dispatch($job); - // })->name('container-status-' . $server->id)->everyMinute()->onOneServer(); - // if ($server->isLogDrainEnabled()) { - // $schedule - // ->call(function () use ($server) { - // $randomSeconds = rand(1, 40); - // $job = new CheckLogDrainContainerJob($server); - // $job->delay($randomSeconds); - // dispatch($job); - // })->name('log-drain-container-check-' . $server->id)->everyMinute()->onOneServer(); - // } - // } - // foreach ($servers as $server) { - // $schedule - // ->call(function () use ($server) { - // $randomSeconds = rand(1, 40); - // $job = new ServerStatusJob($server); - // $job->delay($randomSeconds); - // dispatch($job); - // })->name('server-status-job-' . $server->id)->everyMinute()->onOneServer(); - // } } private function instance_auto_update($schedule) { diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 3c7ea68db..ef210f16b 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -898,6 +898,9 @@ private function deploy_to_additional_destinations() if ($this->application->additional_networks->count() === 0) { return; } + if ($this->pull_request_id !== 0) { + return; + } $destination_ids = $this->application->additional_networks->pluck('id'); if ($this->server->isSwarm()) { $this->application_deployment_queue->addLogEntry("Additional destinations are not supported in swarm mode."); diff --git a/app/Jobs/DatabaseBackupJob.php b/app/Jobs/DatabaseBackupJob.php index aa4b2fa7f..befeffed0 100644 --- a/app/Jobs/DatabaseBackupJob.php +++ b/app/Jobs/DatabaseBackupJob.php @@ -95,7 +95,7 @@ public function handle(): void $databaseType = $this->database->databaseType(); $serviceUuid = $this->database->service->uuid; $serviceName = str($this->database->service->name)->slug(); - if ($databaseType === 'standalone-postgresql') { + if (str($databaseType)->contains('postgres')) { $this->container_name = "{$this->database->name}-$serviceUuid"; $this->directory_name = $serviceName . '-' . $this->container_name; $commands[] = "docker exec $this->container_name env | grep POSTGRES_"; @@ -120,7 +120,7 @@ public function handle(): void } else { $databasesToBackup = $this->database->postgres_user; } - } else if ($databaseType === 'standalone-mysql') { + } else if (str($databaseType)->contains('mysql')) { $this->container_name = "{$this->database->name}-$serviceUuid"; $this->directory_name = $serviceName . '-' . $this->container_name; $commands[] = "docker exec $this->container_name env | grep MYSQL_"; @@ -143,7 +143,7 @@ public function handle(): void } else { throw new \Exception('MYSQL_DATABASE not found'); } - } else if ($databaseType === 'standalone-mariadb') { + } else if (str($databaseType)->contains('mariadb')) { $this->container_name = "{$this->database->name}-$serviceUuid"; $this->directory_name = $serviceName . '-' . $this->container_name; $commands[] = "docker exec $this->container_name env"; @@ -190,32 +190,32 @@ public function handle(): void } if (is_null($databasesToBackup)) { - if ($databaseType === 'standalone-postgresql') { + if (str($databaseType)->contains('postgres')) { $databasesToBackup = [$this->database->postgres_db]; - } else if ($databaseType === 'standalone-mongodb') { + } else if (str($databaseType)->contains('mongodb')) { $databasesToBackup = ['*']; - } else if ($databaseType === 'standalone-mysql') { + } else if (str($databaseType)->contains('mysql')) { $databasesToBackup = [$this->database->mysql_database]; - } else if ($databaseType === 'standalone-mariadb') { + } else if (str($databaseType)->contains('mariadb')) { $databasesToBackup = [$this->database->mariadb_database]; } else { return; } } else { - if ($databaseType === 'standalone-postgresql') { + if (str($databaseType)->contains('postgres')) { // Format: db1,db2,db3 $databasesToBackup = explode(',', $databasesToBackup); $databasesToBackup = array_map('trim', $databasesToBackup); - } else if ($databaseType === 'standalone-mongodb') { + } else if (str($databaseType)->contains('mongodb')) { // Format: db1:collection1,collection2|db2:collection3,collection4 $databasesToBackup = explode('|', $databasesToBackup); $databasesToBackup = array_map('trim', $databasesToBackup); ray($databasesToBackup); - } else if ($databaseType === 'standalone-mysql') { + } else if (str($databaseType)->contains('mysql')) { // Format: db1,db2,db3 $databasesToBackup = explode(',', $databasesToBackup); $databasesToBackup = array_map('trim', $databasesToBackup); - } else if ($databaseType === 'standalone-mariadb') { + } else if (str($databaseType)->contains('mariadb')) { // Format: db1,db2,db3 $databasesToBackup = explode(',', $databasesToBackup); $databasesToBackup = array_map('trim', $databasesToBackup); @@ -235,7 +235,7 @@ public function handle(): void $size = 0; ray('Backing up ' . $database); try { - if ($databaseType === 'standalone-postgresql') { + if (str($databaseType)->contains('postgres')) { $this->backup_file = "/pg-dump-$database-" . Carbon::now()->timestamp . ".dmp"; $this->backup_location = $this->backup_dir . $this->backup_file; $this->backup_log = ScheduledDatabaseBackupExecution::create([ @@ -244,7 +244,7 @@ public function handle(): void 'scheduled_database_backup_id' => $this->backup->id, ]); $this->backup_standalone_postgresql($database); - } else if ($databaseType === 'standalone-mongodb') { + } else if (str($databaseType)->contains('mongodb')) { if ($database === '*') { $database = 'all'; $databaseName = 'all'; @@ -263,7 +263,7 @@ public function handle(): void 'scheduled_database_backup_id' => $this->backup->id, ]); $this->backup_standalone_mongodb($database); - } else if ($databaseType === 'standalone-mysql') { + } else if (str($databaseType)->contains('mysql')) { $this->backup_file = "/mysql-dump-$database-" . Carbon::now()->timestamp . ".dmp"; $this->backup_location = $this->backup_dir . $this->backup_file; $this->backup_log = ScheduledDatabaseBackupExecution::create([ @@ -272,7 +272,7 @@ public function handle(): void 'scheduled_database_backup_id' => $this->backup->id, ]); $this->backup_standalone_mysql($database); - } else if ($databaseType === 'standalone-mariadb') { + } else if (str($databaseType)->contains('mariadb')) { $this->backup_file = "/mariadb-dump-$database-" . Carbon::now()->timestamp . ".dmp"; $this->backup_location = $this->backup_dir . $this->backup_file; $this->backup_log = ScheduledDatabaseBackupExecution::create([ diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.php index 53dd0ffe3..c1a39afee 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php @@ -98,6 +98,7 @@ public function saveVariables($isPreview) } } $environment->is_build_time = false; + $environment->is_multiline = false; $environment->is_preview = $isPreview ? true : false; switch ($this->resource->type()) { case 'application': diff --git a/app/Livewire/RealtimeConnection.php b/app/Livewire/RealtimeConnection.php deleted file mode 100644 index 89b680277..000000000 --- a/app/Livewire/RealtimeConnection.php +++ /dev/null @@ -1,25 +0,0 @@ -user()->update(['is_notification_realtime_enabled' => false]); - $this->showNotification = false; - } - public function mount() { - $this->isNotificationEnabled = auth()->user()->is_notification_realtime_enabled; - $this->checkConnection = auth()->user()->id === 0; - } -} diff --git a/config/sentry.php b/config/sentry.php index b432cb213..ec6abd3c9 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.244', + 'release' => '4.0.0-beta.245', // 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 40004d17e..8b2443f54 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ dropColumn('is_notification_realtime_enabled'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->boolean('is_notification_realtime_enabled')->default(true); + }); + } +}; diff --git a/public/svgs/unknown.svg b/public/svgs/unknown.svg deleted file mode 100644 index d7752c454..000000000 --- a/public/svgs/unknown.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/resources/css/app.css b/resources/css/app.css index ffea7a63a..fa29bf90f 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -116,7 +116,12 @@ .alert-success { .alert-error { @apply flex items-center gap-2 text-error; } - +.tag { + @apply px-2 py-1 cursor-pointer box-description dark:bg-coolgray-100 dark:hover:bg-coolgray-300 bg-neutral-100 hover:bg-neutral-200 +} +.add-tag { + @apply flex items-center px-2 text-xs cursor-pointer dark:text-neutral-500/20 text-neutral-500 group-hover:text-neutral-700 group-hover:dark:text-white dark:hover:bg-coolgray-300 hover:bg-neutral-200; +} .dropdown-item { @apply relative flex cursor-pointer select-none dark:text-white hover:bg-neutral-100 dark:hover:bg-coollabs items-center pr-4 pl-2 py-1 text-xs justify-start outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 gap-2 w-full; } diff --git a/resources/views/components/popup.blade.php b/resources/views/components/popup.blade.php index a184d80b0..8061c29bd 100644 --- a/resources/views/components/popup.blade.php +++ b/resources/views/components/popup.blade.php @@ -6,7 +6,8 @@ x-transition:enter-start="translate-y-full" x-transition:enter-end="translate-y-0" x-transition:leave="transition ease-in duration-300" x-transition:leave-start="translate-y-0" x-transition:leave-end="translate-y-full" x-init="setTimeout(() => { bannerVisible = true }, bannerVisibleAfter);" - class="fixed bottom-0 right-0 w-full h-auto duration-300 ease-out sm:px-5 sm:pb-5 sm:w-[26rem] lg:w-full z-[999]" x-cloak> + class="fixed bottom-0 right-0 w-full h-auto duration-300 ease-out sm:px-5 sm:pb-5 sm:w-[26rem] lg:w-full z-[999]" + x-cloak>
attributes->get('@click') }}" @else @click="bannerVisible=false;" @endif - class="inline-flex items-center justify-center flex-shrink-0 w-1/2 px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 bg-white rounded-md dark:bg-coolgray-200 lg:w-auto dark:text-neutral-200 dark:hover:bg-coolgray-300 focus:shadow-outline focus:outline-none"> + class="inline-flex items-center justify-center flex-shrink-0 w-1/2 px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 rounded-md bg-neutral-100 hover:bg-neutral-200 dark:bg-coolgray-200 lg:w-auto dark:text-neutral-200 dark:hover:bg-coolgray-300 focus:shadow-outline focus:outline-none"> {{ $buttonText }}
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index e502e9e6e..744f33739 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -4,9 +4,6 @@ @if (isSubscribed() || !isCloud()) @endif - @auth - - @endauth @auth
@else -
- data_get($backup, 'id') === data_get($selectedBackup, 'id'), - 'flex flex-col box border-l-2 border-transparent', - ]) wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')"> -
Frequency: {{ $backup->frequency }}
-
Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}
-
Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}
+
+
+ data_get($backup, 'id') === data_get($selectedBackup, 'id'), + 'flex flex-col border-l-2 border-transparent', + ]) wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')"> +
Frequency: {{ $backup->frequency }}
+
Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}
+
Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}
+
@endif @empty diff --git a/resources/views/livewire/project/new/select.blade.php b/resources/views/livewire/project/new/select.blade.php index 289d3a6a9..b218c9557 100644 --- a/resources/views/livewire/project/new/select.blade.php +++ b/resources/views/livewire/project/new/select.blade.php @@ -207,9 +207,25 @@ class="w-[4.5rem] robustness, advanced features, and strong standards compliance. - +
+ + + + + + + + +
+
@@ -219,9 +235,33 @@ class="w-[4.5rem] broker. - +
+ + + + + + + + + + + + + +
@@ -231,9 +271,57 @@ class="w-[4.5rem] optional schemas. - +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -243,9 +331,18 @@ class="w-[4.5rem] flexibility. - +
+ + + + + +
@@ -255,9 +352,14 @@ class="w-[4.5rem] replacement for MySQL. - +
+ + + +
@@ -293,7 +395,6 @@ class="w-[4.5rem] @if (data_get($service, 'slogan')) {{ data_get($service, 'slogan') }} @endif - @if (data_get($service, 'logo')) @@ -310,14 +411,6 @@ class="w-[4.5rem] service. - {{-- --}} @else {{ Str::headline($serviceName) }} @@ -329,12 +422,18 @@ class="w-[4.5rem] @if (file_exists(public_path(data_get($service, 'logo')))) @else - +
+ + + +
@endif
diff --git a/resources/views/livewire/project/resource/index.blade.php b/resources/views/livewire/project/resource/index.blade.php index d46528cc1..ed7641bb1 100644 --- a/resources/views/livewire/project/resource/index.blade.php +++ b/resources/views/livewire/project/resource/index.blade.php @@ -72,10 +72,10 @@ class="items-center justify-center box">+ Add New Resource
-
Add tag
@@ -104,10 +104,10 @@ class="items-center justify-center box">+ Add New Resource
-
Add tag
@@ -136,10 +136,10 @@ class="items-center justify-center box">+ Add New Resource
-
Add tag
@@ -168,10 +168,10 @@ class="items-center justify-center box">+ Add New Resource
-
Add tag
@@ -200,10 +200,10 @@ class="items-center justify-center box">+ Add New Resource
-
Add tag
@@ -232,10 +232,10 @@ class="items-center justify-center box">+ Add New Resource
-
Add tag
@@ -264,10 +264,10 @@ class="items-center justify-center box">+ Add New Resource
-
Add tag
diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php index 8107b0492..1f21e2156 100644 --- a/resources/views/livewire/project/service/configuration.blade.php +++ b/resources/views/livewire/project/service/configuration.blade.php @@ -75,7 +75,7 @@
{{ $application->status }}
- Settings @@ -116,7 +116,7 @@
{{ $database->status }}
- Settings diff --git a/resources/views/livewire/project/service/index.blade.php b/resources/views/livewire/project/service/index.blade.php index eefa25692..563625305 100644 --- a/resources/views/livewire/project/service/index.blade.php +++ b/resources/views/livewire/project/service/index.blade.php @@ -17,10 +17,9 @@ @click.prevent="activeTab = 'scheduled-tasks'; window.location.hash = 'scheduled-tasks'" href="#">Scheduled Tasks - @if ( - $serviceDatabase?->databaseType() === 'standalone-mysql' || - $serviceDatabase?->databaseType() === 'standalone-postgresql' || - $serviceDatabase?->databaseType() === 'standalone-mariadb') + @if (str($serviceDatabase?->databaseType())->contains('mysql') || + str($serviceDatabase?->databaseType())->contains('postgres') || + str($serviceDatabase?->databaseType())->contains('mariadb')) Backups @endif diff --git a/resources/views/livewire/project/shared/environment-variable/show.blade.php b/resources/views/livewire/project/shared/environment-variable/show.blade.php index 99c57b07b..68e728f7e 100644 --- a/resources/views/livewire/project/shared/environment-variable/show.blade.php +++ b/resources/views/livewire/project/shared/environment-variable/show.blade.php @@ -1,6 +1,6 @@
+ class="flex flex-col items-center gap-4 p-4 bg-white border lg:items-start dark:bg-base dark:border-coolgray-300"> @if ($isLocked)
@@ -46,8 +46,8 @@ class="font-bold dark:text-warning text-coollabs">{{ $env->key }}. @if ($env->is_shared) @else - - + + @endif @endif
diff --git a/resources/views/livewire/realtime-connection.blade.php b/resources/views/livewire/realtime-connection.blade.php deleted file mode 100644 index 5a9d14a9f..000000000 --- a/resources/views/livewire/realtime-connection.blade.php +++ /dev/null @@ -1,48 +0,0 @@ -
- @if ($checkConnection) - @script - - @endscript -
-
- WARNING: Coolify could not connect to the new - realtime service introduced in beta.154.
This will cause unusual problems on the UI if not - fixed!

Please check the - related documentation or get - help on Discord.
- Acknowledge the problem and disable this - popup -
-
- @endif -
diff --git a/versions.json b/versions.json index 058d748c8..3a4b38eff 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,7 @@ "version": "3.12.36" }, "v4": { - "version": "4.0.0-beta.244" + "version": "4.0.0-beta.245" } } }