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>