diff --git a/app/Actions/CoolifyTask/RunRemoteProcess.php b/app/Actions/CoolifyTask/RunRemoteProcess.php index 0a7892f98..192144f8b 100644 --- a/app/Actions/CoolifyTask/RunRemoteProcess.php +++ b/app/Actions/CoolifyTask/RunRemoteProcess.php @@ -66,8 +66,8 @@ public static function decodeOutput(?Activity $activity = null): string } return collect($decoded) - ->sortBy(fn($i) => $i['order']) - ->map(fn($i) => $i['output']) + ->sortBy(fn ($i) => $i['order']) + ->map(fn ($i) => $i['output']) ->implode(""); } diff --git a/app/Actions/Database/StartPostgresql.php b/app/Actions/Database/StartPostgresql.php index 4b9b99f3e..1b5d22f44 100644 --- a/app/Actions/Database/StartPostgresql.php +++ b/app/Actions/Database/StartPostgresql.php @@ -134,15 +134,15 @@ private function generate_environment_variables() $environment_variables->push("$env->key=$env->value"); } - if ($environment_variables->filter(fn($env) => Str::of($env)->contains('POSTGRES_USER'))->isEmpty()) { + if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('POSTGRES_USER'))->isEmpty()) { $environment_variables->push("POSTGRES_USER={$this->database->postgres_user}"); } - if ($environment_variables->filter(fn($env) => Str::of($env)->contains('POSTGRES_PASSWORD'))->isEmpty()) { + if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('POSTGRES_PASSWORD'))->isEmpty()) { $environment_variables->push("POSTGRES_PASSWORD={$this->database->postgres_password}"); } - if ($environment_variables->filter(fn($env) => Str::of($env)->contains('POSTGRES_DB'))->isEmpty()) { + if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('POSTGRES_DB'))->isEmpty()) { $environment_variables->push("POSTGRES_DB={$this->database->postgres_db}"); } return $environment_variables->all(); diff --git a/app/Actions/Fortify/UpdateUserProfileInformation.php b/app/Actions/Fortify/UpdateUserProfileInformation.php index c8f2cce59..85caf943b 100644 --- a/app/Actions/Fortify/UpdateUserProfileInformation.php +++ b/app/Actions/Fortify/UpdateUserProfileInformation.php @@ -29,8 +29,10 @@ public function update(User $user, array $input): void ], ])->validateWithBag('updateProfileInformation'); - if ($input['email'] !== $user->email && - $user instanceof MustVerifyEmail) { + if ( + $input['email'] !== $user->email && + $user instanceof MustVerifyEmail + ) { $this->updateVerifiedUser($user, $input); } else { $user->forceFill([ diff --git a/app/Actions/Proxy/CheckConfigurationSync.php b/app/Actions/Proxy/CheckConfigurationSync.php index af7804cb7..b6dcb1069 100644 --- a/app/Actions/Proxy/CheckConfigurationSync.php +++ b/app/Actions/Proxy/CheckConfigurationSync.php @@ -22,5 +22,4 @@ public function __invoke(Server $server, bool $reset = false) return $proxy_configuration; } - } diff --git a/app/Actions/Proxy/SaveConfigurationSync.php b/app/Actions/Proxy/SaveConfigurationSync.php index f4c009079..c17607516 100644 --- a/app/Actions/Proxy/SaveConfigurationSync.php +++ b/app/Actions/Proxy/SaveConfigurationSync.php @@ -20,4 +20,4 @@ public function __invoke(Server $server, string $configuration) "echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml", ], $server); } -} \ No newline at end of file +} diff --git a/app/Console/Commands/NotifyDemo.php b/app/Console/Commands/NotifyDemo.php index 37b84d489..72e4a37e6 100644 --- a/app/Console/Commands/NotifyDemo.php +++ b/app/Console/Commands/NotifyDemo.php @@ -43,15 +43,16 @@ private function showHelp() style('coolify')->color('#9333EA'); style('title-box')->apply('mt-1 px-2 py-1 bg-coolify'); - render(<<<'HTML' + render( + <<<'HTML'
Coolify
-

+

Demo Notify => Send a demo notification to a given channel.

-

+

php artisan app:demo-notify {channel}

diff --git a/app/Console/Commands/SyncBunny.php b/app/Console/Commands/SyncBunny.php index 131d20130..3f4bc412a 100644 --- a/app/Console/Commands/SyncBunny.php +++ b/app/Console/Commands/SyncBunny.php @@ -64,7 +64,7 @@ public function handle() ]); }); try { - Http::pool(fn(Pool $pool) => [ + Http::pool(fn (Pool $pool) => [ $pool->storage(file: "$parent_dir/$compose_file")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file"), $pool->storage(file: "$parent_dir/$compose_file_prod")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file_prod"), $pool->storage(file: "$parent_dir/$production_env")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$production_env"), @@ -73,7 +73,7 @@ public function handle() $pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$versions"), ]); ray("{$bunny_cdn}/{$bunny_cdn_path}"); - Http::pool(fn(Pool $pool) => [ + Http::pool(fn (Pool $pool) => [ $pool->purge("$bunny_cdn/$bunny_cdn_path/$compose_file"), $pool->purge("$bunny_cdn/$bunny_cdn_path/$compose_file_prod"), $pool->purge("$bunny_cdn/$bunny_cdn_path/$production_env"), diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index a995adcc5..f26b2ef4d 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -17,7 +17,7 @@ class Kernel extends ConsoleKernel { protected function schedule(Schedule $schedule): void { -// $schedule->call(fn() => $this->check_scheduled_backups($schedule))->everyTenSeconds(); + // $schedule->call(fn() => $this->check_scheduled_backups($schedule))->everyTenSeconds(); if (is_dev()) { $schedule->command('horizon:snapshot')->everyMinute(); $schedule->job(new InstanceApplicationsStatusJob)->everyMinute(); @@ -54,7 +54,6 @@ private function check_scheduled_backups($schedule) backup: $scheduled_backup ))->cron($scheduled_backup->frequency); } - } protected function commands(): void diff --git a/app/Data/CoolifyTaskArgs.php b/app/Data/CoolifyTaskArgs.php index d451faa00..1b30126f0 100644 --- a/app/Data/CoolifyTaskArgs.php +++ b/app/Data/CoolifyTaskArgs.php @@ -22,7 +22,6 @@ public function __construct( public ?Model $model = null, public string $status = ProcessStatus::QUEUED->value, public bool $ignore_errors = false, - ) - { + ) { } } diff --git a/app/Data/ServerMetadata.php b/app/Data/ServerMetadata.php index 18f734ce4..b18ddab8e 100644 --- a/app/Data/ServerMetadata.php +++ b/app/Data/ServerMetadata.php @@ -11,7 +11,6 @@ class ServerMetadata extends Data public function __construct( public ?ProxyTypes $type, public ?ProxyStatus $status - ) - { + ) { } } diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index deced9de9..7284277e8 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -24,7 +24,7 @@ public function subscription() abort(404); } return view('subscription', [ - 'settings' => InstanceSettings::get() + 'settings' => InstanceSettings::get(), ]); } @@ -34,7 +34,7 @@ public function license() abort(404); } return view('settings.license', [ - 'settings' => InstanceSettings::get() + 'settings' => InstanceSettings::get(), ]); } @@ -63,13 +63,11 @@ public function settings() $settings = InstanceSettings::get(); $database = StandalonePostgresql::whereName('coolify-db')->first(); if ($database) { - $backup = $database->scheduledBackups->first(); $s3s = S3Storage::whereTeamId(0)->get(); } return view('settings.configuration', [ 'settings' => $settings, 'database' => $database, - 'backup' => $backup ?? null, 's3s' => $s3s ?? [], ]); } else { diff --git a/app/Http/Livewire/Dev/S3Test.php b/app/Http/Livewire/Dev/S3Test.php index 0d67717fa..3a20224cd 100644 --- a/app/Http/Livewire/Dev/S3Test.php +++ b/app/Http/Livewire/Dev/S3Test.php @@ -31,7 +31,6 @@ public function save() } catch (\Throwable $th) { return general_error_handler($th, $this, false); } - } public function get_files() diff --git a/app/Http/Livewire/Project/Database/BackupEdit.php b/app/Http/Livewire/Project/Database/BackupEdit.php index 56d472672..39b29c83f 100644 --- a/app/Http/Livewire/Project/Database/BackupEdit.php +++ b/app/Http/Livewire/Project/Database/BackupEdit.php @@ -54,18 +54,13 @@ public function instantSave() } catch (\Exception $e) { $this->emit('error', $e->getMessage()); } - } private function custom_validate() { -// if ($this->backup->save_s3) { -// if (!is_numeric($this->selected_storage_id)) { -// throw new \Exception('Invalid S3 Storage'); -// } else { -// $this->backup->s3_storage_id = $this->selected_storage_id; -// } -// } + if (!is_numeric($this->backup->s3_storage_id)) { + $this->backup->s3_storage_id = null; + } $isValid = validate_cron_expression($this->backup->frequency); if (!$isValid) { throw new \Exception('Invalid Cron / Human expression'); diff --git a/app/Http/Livewire/Project/Database/BackupExecution.php b/app/Http/Livewire/Project/Database/BackupExecution.php index 5e48bbec4..f963fa1d6 100644 --- a/app/Http/Livewire/Project/Database/BackupExecution.php +++ b/app/Http/Livewire/Project/Database/BackupExecution.php @@ -11,7 +11,6 @@ class BackupExecution extends Component public function download() { - } public function delete(): void diff --git a/app/Http/Livewire/Project/Database/BackupNow.php b/app/Http/Livewire/Project/Database/BackupNow.php new file mode 100644 index 000000000..ea25c4744 --- /dev/null +++ b/app/Http/Livewire/Project/Database/BackupNow.php @@ -0,0 +1,18 @@ +backup + )); + $this->emit('success', 'Backup queued. It will be available in a few minutes'); + } +} diff --git a/app/Http/Livewire/Project/Database/Postgresql/General.php b/app/Http/Livewire/Project/Database/Postgresql/General.php index 5f9da02ff..c58bd51e3 100644 --- a/app/Http/Livewire/Project/Database/Postgresql/General.php +++ b/app/Http/Livewire/Project/Database/Postgresql/General.php @@ -42,7 +42,7 @@ class General extends Component public function save_init_script($script) { - $this->database->init_scripts = filter($this->database->init_scripts, fn($s) => $s['filename'] !== $script['filename']); + $this->database->init_scripts = filter($this->database->init_scripts, fn ($s) => $s['filename'] !== $script['filename']); $this->database->init_scripts = array_merge($this->database->init_scripts, [$script]); $this->database->save(); $this->emit('success', 'Init script saved successfully.'); @@ -53,8 +53,8 @@ public function delete_init_script($script) $collection = collect($this->database->init_scripts); $found = $collection->firstWhere('filename', $script['filename']); if ($found) { - ray($collection->filter(fn($s) => $s['filename'] !== $script['filename'])->toArray()); - $this->database->init_scripts = $collection->filter(fn($s) => $s['filename'] !== $script['filename'])->toArray(); + ray($collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray()); + $this->database->init_scripts = $collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray(); $this->database->save(); $this->refresh(); $this->emit('success', 'Init script deleted successfully.'); diff --git a/app/Http/Livewire/Settings/Backup.php b/app/Http/Livewire/Settings/Backup.php index 0b0dde7f2..6d714c93d 100644 --- a/app/Http/Livewire/Settings/Backup.php +++ b/app/Http/Livewire/Settings/Backup.php @@ -2,12 +2,12 @@ namespace App\Http\Livewire\Settings; +use App\Jobs\DatabaseBackupJob; use App\Models\InstanceSettings; use App\Models\S3Storage; use App\Models\ScheduledDatabaseBackup; use App\Models\Server; use App\Models\StandalonePostgresql; -use App\Jobs\DatabaseBackupJob; use Livewire\Component; class Backup extends Component @@ -16,6 +16,7 @@ class Backup extends Component public $s3s; public StandalonePostgresql|null $database = null; public ScheduledDatabaseBackup|null $backup = null; + public $executions = []; protected $rules = [ 'database.uuid' => 'required', @@ -33,9 +34,13 @@ class Backup extends Component 'database.postgres_password' => 'postgres password', ]; + public function mount() + { + $this->backup = $this->database->scheduledBackups->first(); + $this->executions = $this->backup->executions; + } public function add_coolify_database() { - ray('add_coolify_database'); $server = Server::find(0); $out = instant_remote_process(['docker inspect coolify-db'], $server); $envs = format_docker_envs_to_json($out); @@ -68,7 +73,8 @@ public function add_coolify_database() $this->s3s = S3Storage::whereTeamId(0)->get(); } - public function backup_now() { + public function backup_now() + { dispatch(new DatabaseBackupJob( backup: $this->backup )); @@ -78,5 +84,4 @@ public function submit() { $this->emit('success', 'Backup updated successfully'); } - } diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.php index e4b7eb3f6..965f0335b 100644 --- a/app/Http/Livewire/Settings/Configuration.php +++ b/app/Http/Livewire/Settings/Configuration.php @@ -77,35 +77,35 @@ private function setup_instance_fqdn() $schema = $url->getScheme(); $traefik_dynamic_conf = [ 'http' => + [ + 'routers' => [ - 'routers' => - [ - 'coolify-http' => - [ - 'entryPoints' => [ - 0 => 'http', - ], - 'service' => 'coolify', - 'rule' => "Host(`{$host}`)", - ], - ], - 'services' => - [ - 'coolify' => - [ - 'loadBalancer' => - [ - 'servers' => - [ - 0 => - [ - 'url' => 'http://coolify:80', - ], - ], - ], - ], + 'coolify-http' => + [ + 'entryPoints' => [ + 0 => 'http', ], + 'service' => 'coolify', + 'rule' => "Host(`{$host}`)", + ], ], + 'services' => + [ + 'coolify' => + [ + 'loadBalancer' => + [ + 'servers' => + [ + 0 => + [ + 'url' => 'http://coolify:80', + ], + ], + ], + ], + ], + ], ]; if ($schema === 'https') { diff --git a/app/Http/Livewire/Team/Storage/Create.php b/app/Http/Livewire/Team/Storage/Create.php index 3edf29c20..ed7d277fb 100644 --- a/app/Http/Livewire/Team/Storage/Create.php +++ b/app/Http/Livewire/Team/Storage/Create.php @@ -70,7 +70,6 @@ public function submit() } catch (\Throwable $th) { return general_error_handler($th, $this); } - } private function test_s3_connection() diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 559dd2fc3..c80ad531b 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -20,7 +20,7 @@ class TrustProxies extends Middleware * @var int */ protected $headers = - Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index bed7e0a11..a37b609c7 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -434,7 +434,7 @@ private function generate_environment_variables($ports) } } // Add PORT if not exists, use the first port as default - if ($environment_variables->filter(fn($env) => Str::of($env)->contains('PORT'))->isEmpty()) { + if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('PORT'))->isEmpty()) { $environment_variables->push("PORT={$ports[0]}"); } return $environment_variables->all(); diff --git a/app/Jobs/ApplicationPullRequestUpdateJob.php b/app/Jobs/ApplicationPullRequestUpdateJob.php index 2b84cbe5a..f54063183 100755 --- a/app/Jobs/ApplicationPullRequestUpdateJob.php +++ b/app/Jobs/ApplicationPullRequestUpdateJob.php @@ -25,8 +25,7 @@ public function __construct( public int $pull_request_id, public string $deployment_uuid, public string $status - ) - { + ) { } public function handle() diff --git a/app/Jobs/CoolifyTask.php b/app/Jobs/CoolifyTask.php index 10bc89358..e3dd9640f 100755 --- a/app/Jobs/CoolifyTask.php +++ b/app/Jobs/CoolifyTask.php @@ -20,8 +20,7 @@ class CoolifyTask implements ShouldQueue public function __construct( public Activity $activity, public bool $ignore_errors = false, - ) - { + ) { } /** diff --git a/app/Jobs/DatabaseBackupJob.php b/app/Jobs/DatabaseBackupJob.php index 7879e31a0..3fdbea216 100644 --- a/app/Jobs/DatabaseBackupJob.php +++ b/app/Jobs/DatabaseBackupJob.php @@ -157,7 +157,7 @@ private function upload_to_s3(): void } $key = $this->s3->key; $secret = $this->s3->secret; -// $region = $this->s3->region; + // $region = $this->s3->region; $bucket = $this->s3->bucket; $endpoint = $this->s3->endpoint; @@ -183,6 +183,5 @@ private function save_backup_logs(): void 'message' => $this->backup_output, 'size' => $this->size, ]); - } } diff --git a/app/Jobs/SendMessageToDiscordJob.php b/app/Jobs/SendMessageToDiscordJob.php index 577b3a907..66e3c1c1a 100644 --- a/app/Jobs/SendMessageToDiscordJob.php +++ b/app/Jobs/SendMessageToDiscordJob.php @@ -28,8 +28,7 @@ class SendMessageToDiscordJob implements ShouldQueue public function __construct( public string $text, public string $webhookUrl - ) - { + ) { } /** diff --git a/app/Models/Application.php b/app/Models/Application.php index bc4d48b1a..9602d45ec 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -41,7 +41,7 @@ public function type() public function publishDirectory(): Attribute { return Attribute::make( - set: fn($value) => $value ? '/' . ltrim($value, '/') : null, + set: fn ($value) => $value ? '/' . ltrim($value, '/') : null, ); } @@ -71,14 +71,14 @@ public function gitCommits(): Attribute public function baseDirectory(): Attribute { return Attribute::make( - set: fn($value) => '/' . ltrim($value, '/'), + set: fn ($value) => '/' . ltrim($value, '/'), ); } public function portsMappings(): Attribute { return Attribute::make( - set: fn($value) => $value === "" ? null : $value, + set: fn ($value) => $value === "" ? null : $value, ); } @@ -87,7 +87,7 @@ public function portsMappings(): Attribute public function portsMappingsArray(): Attribute { return Attribute::make( - get: fn() => is_null($this->ports_mappings) + get: fn () => is_null($this->ports_mappings) ? [] : explode(',', $this->ports_mappings), @@ -97,7 +97,7 @@ public function portsMappingsArray(): Attribute public function portsExposesArray(): Attribute { return Attribute::make( - get: fn() => is_null($this->ports_exposes) + get: fn () => is_null($this->ports_exposes) ? [] : explode(',', $this->ports_exposes) ); diff --git a/app/Models/Environment.php b/app/Models/Environment.php index 458223ac9..470ad5e6c 100644 --- a/app/Models/Environment.php +++ b/app/Models/Environment.php @@ -45,7 +45,7 @@ public function services() protected function name(): Attribute { return Attribute::make( - set: fn(string $value) => strtolower($value), + set: fn (string $value) => strtolower($value), ); } } diff --git a/app/Models/EnvironmentVariable.php b/app/Models/EnvironmentVariable.php index 7bbc98014..bb4a5ca47 100644 --- a/app/Models/EnvironmentVariable.php +++ b/app/Models/EnvironmentVariable.php @@ -34,8 +34,8 @@ protected static function booted() protected function value(): Attribute { return Attribute::make( - get: fn(string $value) => $this->get_environment_variables($value), - set: fn(string $value) => $this->set_environment_variables($value), + get: fn (string $value) => $this->get_environment_variables($value), + set: fn (string $value) => $this->set_environment_variables($value), ); } @@ -67,7 +67,7 @@ private function set_environment_variables(string $environment_variable): string protected function key(): Attribute { return Attribute::make( - set: fn(string $value) => Str::of($value)->trim(), + set: fn (string $value) => Str::of($value)->trim(), ); } } diff --git a/app/Models/LocalPersistentVolume.php b/app/Models/LocalPersistentVolume.php index 68d6faded..a35f31cdc 100644 --- a/app/Models/LocalPersistentVolume.php +++ b/app/Models/LocalPersistentVolume.php @@ -23,14 +23,14 @@ public function standalone_postgresql() protected function name(): Attribute { return Attribute::make( - set: fn(string $value) => Str::of($value)->trim()->value, + set: fn (string $value) => Str::of($value)->trim()->value, ); } protected function mountPath(): Attribute { return Attribute::make( - set: fn(string $value) => Str::of($value)->trim()->start('/')->value + set: fn (string $value) => Str::of($value)->trim()->start('/')->value ); } diff --git a/app/Models/StandalonePostgresql.php b/app/Models/StandalonePostgresql.php index ccfaae040..6c00e302c 100644 --- a/app/Models/StandalonePostgresql.php +++ b/app/Models/StandalonePostgresql.php @@ -33,7 +33,7 @@ protected static function booted() public function portsMappings(): Attribute { return Attribute::make( - set: fn($value) => $value === "" ? null : $value, + set: fn ($value) => $value === "" ? null : $value, ); } @@ -42,7 +42,7 @@ public function portsMappings(): Attribute public function portsMappingsArray(): Attribute { return Attribute::make( - get: fn() => is_null($this->ports_mappings) + get: fn () => is_null($this->ports_mappings) ? [] : explode(',', $this->ports_mappings), diff --git a/app/Notifications/Channels/EmailChannel.php b/app/Notifications/Channels/EmailChannel.php index 64051c931..638939589 100644 --- a/app/Notifications/Channels/EmailChannel.php +++ b/app/Notifications/Channels/EmailChannel.php @@ -23,7 +23,7 @@ public function send(SendsEmail $notifiable, Notification $notification): void Mail::send( [], [], - fn(Message $message) => $message + fn (Message $message) => $message ->from( data_get($notifiable, 'smtp_from_address'), data_get($notifiable, 'smtp_from_name'), diff --git a/app/Notifications/Channels/SendsEmail.php b/app/Notifications/Channels/SendsEmail.php index dabbb7a6d..fc7528834 100644 --- a/app/Notifications/Channels/SendsEmail.php +++ b/app/Notifications/Channels/SendsEmail.php @@ -5,4 +5,4 @@ interface SendsEmail { public function getRecepients($notification); -} \ No newline at end of file +} diff --git a/app/Notifications/Channels/TransactionalEmailChannel.php b/app/Notifications/Channels/TransactionalEmailChannel.php index 3d5328f81..bf968eb3f 100644 --- a/app/Notifications/Channels/TransactionalEmailChannel.php +++ b/app/Notifications/Channels/TransactionalEmailChannel.php @@ -25,7 +25,7 @@ public function send(User $notifiable, Notification $notification): void Mail::send( [], [], - fn(Message $message) => $message + fn (Message $message) => $message ->from( data_get($settings, 'smtp_from_address'), data_get($settings, 'smtp_from_name') diff --git a/app/Notifications/TransactionalEmails/ResetPassword.php b/app/Notifications/TransactionalEmails/ResetPassword.php index 816c1a671..e9baa16d1 100644 --- a/app/Notifications/TransactionalEmails/ResetPassword.php +++ b/app/Notifications/TransactionalEmails/ResetPassword.php @@ -49,7 +49,6 @@ public function via($notifiable) return ['mail']; } throw new \Exception('SMTP is not enabled'); - } public function toMail($notifiable) diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index b3e67c255..7fe2468e1 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -23,7 +23,8 @@ class FortifyServiceProvider extends ServiceProvider */ public function register(): void { - $this->app->instance(RegisterResponse::class, new class implements RegisterResponse { + $this->app->instance(RegisterResponse::class, new class implements RegisterResponse + { public function toResponse($request) { // First user (root) will be redirected to /settings instead of / on registration. diff --git a/app/View/Components/Forms/Button.php b/app/View/Components/Forms/Button.php index e4df04cf6..2b67c6915 100644 --- a/app/View/Components/Forms/Button.php +++ b/app/View/Components/Forms/Button.php @@ -17,8 +17,7 @@ public function __construct( public bool $noStyle = false, public string|null $modalId = null, public string $defaultClass = "btn btn-primary btn-sm font-normal text-white normal-case no-animation rounded border-none" - ) - { + ) { if ($this->noStyle) { $this->defaultClass = ""; } diff --git a/app/View/Components/Forms/Checkbox.php b/app/View/Components/Forms/Checkbox.php index e730266a3..1f1d634f3 100644 --- a/app/View/Components/Forms/Checkbox.php +++ b/app/View/Components/Forms/Checkbox.php @@ -20,8 +20,7 @@ public function __construct( public bool $instantSave = false, public bool $disabled = false, public string $defaultClass = "toggle toggle-xs toggle-warning rounded disabled:bg-coolgray-200 disabled:opacity-50 placeholder:text-neutral-700" - ) - { + ) { // } diff --git a/app/View/Components/Forms/Input.php b/app/View/Components/Forms/Input.php index ab77e7491..6d3346dcf 100644 --- a/app/View/Components/Forms/Input.php +++ b/app/View/Components/Forms/Input.php @@ -21,8 +21,7 @@ public function __construct( public string|null $helper = null, public bool $allowToPeak = true, public string $defaultClass = "input input-sm bg-coolgray-200 rounded text-white w-full disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50" - ) - { + ) { } public function render(): View|Closure|string diff --git a/app/View/Components/Forms/Select.php b/app/View/Components/Forms/Select.php index f74cd3109..58f59a683 100644 --- a/app/View/Components/Forms/Select.php +++ b/app/View/Components/Forms/Select.php @@ -20,8 +20,7 @@ public function __construct( public string|null $helper = null, public bool $required = false, public string $defaultClass = "select select-sm w-full rounded text-white text-sm bg-coolgray-200 font-normal disabled:bg-coolgray-200/50 disabled:border-none" - ) - { + ) { // } diff --git a/app/View/Components/Forms/Textarea.php b/app/View/Components/Forms/Textarea.php index 61f4f757f..c85c8b6f7 100644 --- a/app/View/Components/Forms/Textarea.php +++ b/app/View/Components/Forms/Textarea.php @@ -25,8 +25,7 @@ public function __construct( public bool $readonly = false, public string|null $helper = null, public string $defaultClass = "textarea bg-coolgray-200 rounded text-white scrollbar disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50" - ) - { + ) { // } diff --git a/app/View/Components/Modal.php b/app/View/Components/Modal.php index 0b7d66dae..3ef89fb1d 100644 --- a/app/View/Components/Modal.php +++ b/app/View/Components/Modal.php @@ -18,8 +18,7 @@ public function __construct( public string|null $modalSubmit = null, public bool $yesOrNo = false, public string $action = 'delete' - ) - { + ) { // } diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php index 21c72ebf6..82f6e4521 100644 --- a/bootstrap/helpers/docker.php +++ b/bootstrap/helpers/docker.php @@ -8,8 +8,8 @@ function format_docker_command_output_to_json($rawOutput): Collection $outputLines = explode(PHP_EOL, $rawOutput); return collect($outputLines) - ->reject(fn($line) => empty($line)) - ->map(fn($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR)); + ->reject(fn ($line) => empty($line)) + ->map(fn ($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR)); } function format_docker_labels_to_json($rawOutput): Collection @@ -17,7 +17,7 @@ function format_docker_labels_to_json($rawOutput): Collection $outputLines = explode(PHP_EOL, $rawOutput); return collect($outputLines) - ->reject(fn($line) => empty($line)) + ->reject(fn ($line) => empty($line)) ->map(function ($outputLine) { $outputArray = explode(',', $outputLine); return collect($outputArray) diff --git a/bootstrap/helpers/proxy.php b/bootstrap/helpers/proxy.php index 831d5fc0b..77ea397ae 100644 --- a/bootstrap/helpers/proxy.php +++ b/bootstrap/helpers/proxy.php @@ -104,52 +104,52 @@ function setup_default_redirect_404(string|null $redirect_url, Server $server) } else { $traefik_dynamic_conf = [ 'http' => + [ + 'routers' => [ - 'routers' => - [ - 'catchall' => - [ - 'entryPoints' => [ - 0 => 'http', - 1 => 'https', - ], - 'service' => 'noop', - 'rule' => "HostRegexp(`{catchall:.*}`)", - 'priority' => 1, - 'middlewares' => [ - 0 => 'redirect-regexp@file', - ], - ], + 'catchall' => + [ + 'entryPoints' => [ + 0 => 'http', + 1 => 'https', ], - 'services' => - [ - 'noop' => - [ - 'loadBalancer' => - [ - 'servers' => - [ - 0 => - [ - 'url' => '', - ], - ], - ], - ], - ], - 'middlewares' => - [ - 'redirect-regexp' => - [ - 'redirectRegex' => - [ - 'regex' => '(.*)', - 'replacement' => $redirect_url, - 'permanent' => false, - ], - ], + 'service' => 'noop', + 'rule' => "HostRegexp(`{catchall:.*}`)", + 'priority' => 1, + 'middlewares' => [ + 0 => 'redirect-regexp@file', ], + ], ], + 'services' => + [ + 'noop' => + [ + 'loadBalancer' => + [ + 'servers' => + [ + 0 => + [ + 'url' => '', + ], + ], + ], + ], + ], + 'middlewares' => + [ + 'redirect-regexp' => + [ + 'redirectRegex' => + [ + 'regex' => '(.*)', + 'replacement' => $redirect_url, + 'permanent' => false, + ], + ], + ], + ], ]; $yaml = Yaml::dump($traefik_dynamic_conf, 12, 2); $yaml = diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.php index 2fe78960b..3f8f567d8 100644 --- a/bootstrap/helpers/remoteProcess.php +++ b/bootstrap/helpers/remoteProcess.php @@ -27,8 +27,7 @@ function remote_process( ?string $type_uuid = null, ?Model $model = null, bool $ignore_errors = false, -): Activity -{ +): Activity { $command_string = implode("\n", $command); if (auth()->user()) { @@ -141,10 +140,10 @@ function decode_remote_command_output(?ApplicationDeploymentQueue $application_d } $formatted = collect($decoded); if (!$is_debug_enabled) { - $formatted = $formatted->filter(fn($i) => $i['hidden'] === false ?? false); + $formatted = $formatted->filter(fn ($i) => $i['hidden'] === false ?? false); } $formatted = $formatted - ->sortBy(fn($i) => $i['order']) + ->sortBy(fn ($i) => $i['order']) ->map(function ($i) { $i['timestamp'] = Carbon::parse($i['timestamp'])->format('Y-M-d H:i:s.u'); return $i; diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 5dbae95b2..e6a8eed91 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -178,5 +178,3 @@ function validate_cron_expression($expression_to_validate): bool } return $isValid; } - - diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index d874cd9dc..31ddf8720 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -30,7 +30,7 @@ public function definition(): array */ public function unverified(): static { - return $this->state(fn(array $attributes) => [ + return $this->state(fn (array $attributes) => [ 'email_verified_at' => null, ]); } diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 2b909d2e2..321128a8f 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php index 1bc0eeeae..81a7229b0 100644 --- a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php +++ b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php index eb46a82cc..b490e24f5 100644 --- a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php +++ b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php @@ -5,7 +5,8 @@ use Illuminate\Support\Facades\Schema; use Laravel\Fortify\Fortify; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index 5f7e6b53d..954f7518f 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_20_112809_create_sessions_table.php b/database/migrations/2023_03_20_112809_create_sessions_table.php index f2251eef9..f60625bb5 100644 --- a/database/migrations/2023_03_20_112809_create_sessions_table.php +++ b/database/migrations/2023_03_20_112809_create_sessions_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_20_112811_create_teams_table.php b/database/migrations/2023_03_20_112811_create_teams_table.php index 5c7677c11..0f41c5e95 100644 --- a/database/migrations/2023_03_20_112811_create_teams_table.php +++ b/database/migrations/2023_03_20_112811_create_teams_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_20_112812_create_team_user_table.php b/database/migrations/2023_03_20_112812_create_team_user_table.php index 2ee7fd2e0..9eeeb4b31 100644 --- a/database/migrations/2023_03_20_112812_create_team_user_table.php +++ b/database/migrations/2023_03_20_112812_create_team_user_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_20_112813_create_team_invitations_table.php b/database/migrations/2023_03_20_112813_create_team_invitations_table.php index f0d383cc0..9bce2be92 100644 --- a/database/migrations/2023_03_20_112813_create_team_invitations_table.php +++ b/database/migrations/2023_03_20_112813_create_team_invitations_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_20_112814_create_instance_settings_table.php b/database/migrations/2023_03_20_112814_create_instance_settings_table.php index 9aaad9386..51b156ccb 100644 --- a/database/migrations/2023_03_20_112814_create_instance_settings_table.php +++ b/database/migrations/2023_03_20_112814_create_instance_settings_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_24_140711_create_servers_table.php b/database/migrations/2023_03_24_140711_create_servers_table.php index bd2f89e25..0f3bf7419 100644 --- a/database/migrations/2023_03_24_140711_create_servers_table.php +++ b/database/migrations/2023_03_24_140711_create_servers_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_24_140712_create_server_settings_table.php b/database/migrations/2023_03_24_140712_create_server_settings_table.php index 0ac47b914..a3b1c8b44 100644 --- a/database/migrations/2023_03_24_140712_create_server_settings_table.php +++ b/database/migrations/2023_03_24_140712_create_server_settings_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_24_140853_create_private_keys_table.php b/database/migrations/2023_03_24_140853_create_private_keys_table.php index b162e635e..21acf7d05 100644 --- a/database/migrations/2023_03_24_140853_create_private_keys_table.php +++ b/database/migrations/2023_03_24_140853_create_private_keys_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_075351_create_projects_table.php b/database/migrations/2023_03_27_075351_create_projects_table.php index dd0230190..432496268 100644 --- a/database/migrations/2023_03_27_075351_create_projects_table.php +++ b/database/migrations/2023_03_27_075351_create_projects_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_075443_create_project_settings_table.php b/database/migrations/2023_03_27_075443_create_project_settings_table.php index 83f4290b2..35f691ea8 100644 --- a/database/migrations/2023_03_27_075443_create_project_settings_table.php +++ b/database/migrations/2023_03_27_075443_create_project_settings_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_075444_create_environments_table.php b/database/migrations/2023_03_27_075444_create_environments_table.php index 5a329ae1e..f9514dcce 100644 --- a/database/migrations/2023_03_27_075444_create_environments_table.php +++ b/database/migrations/2023_03_27_075444_create_environments_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_081716_create_applications_table.php b/database/migrations/2023_03_27_081716_create_applications_table.php index e5b01f202..ec91f0737 100644 --- a/database/migrations/2023_03_27_081716_create_applications_table.php +++ b/database/migrations/2023_03_27_081716_create_applications_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_081717_create_application_settings_table.php b/database/migrations/2023_03_27_081717_create_application_settings_table.php index 02da3a952..e13f7f366 100644 --- a/database/migrations/2023_03_27_081717_create_application_settings_table.php +++ b/database/migrations/2023_03_27_081717_create_application_settings_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_081718_create_application_previews_table.php b/database/migrations/2023_03_27_081718_create_application_previews_table.php index b0e379303..66211eee4 100644 --- a/database/migrations/2023_03_27_081718_create_application_previews_table.php +++ b/database/migrations/2023_03_27_081718_create_application_previews_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_083621_create_services_table.php b/database/migrations/2023_03_27_083621_create_services_table.php index a5ecff45e..12bb77b1b 100644 --- a/database/migrations/2023_03_27_083621_create_services_table.php +++ b/database/migrations/2023_03_27_083621_create_services_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php b/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php index 6f8630d26..f7f430099 100644 --- a/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php +++ b/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php b/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php index 653f7857e..ea85640ba 100644 --- a/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php +++ b/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_28_062150_create_kubernetes_table.php b/database/migrations/2023_03_28_062150_create_kubernetes_table.php index 454a4ad18..365380e1f 100644 --- a/database/migrations/2023_03_28_062150_create_kubernetes_table.php +++ b/database/migrations/2023_03_28_062150_create_kubernetes_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_28_083723_create_github_apps_table.php b/database/migrations/2023_03_28_083723_create_github_apps_table.php index 71b914d09..27f193912 100644 --- a/database/migrations/2023_03_28_083723_create_github_apps_table.php +++ b/database/migrations/2023_03_28_083723_create_github_apps_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php b/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php index 59a192e2f..24db88d86 100644 --- a/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php +++ b/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php b/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php index 6466a0e92..c3f2a976a 100644 --- a/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php +++ b/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_05_04_194548_create_environment_variables_table.php b/database/migrations/2023_05_04_194548_create_environment_variables_table.php index e0ebb77a0..4a03ead55 100644 --- a/database/migrations/2023_05_04_194548_create_environment_variables_table.php +++ b/database/migrations/2023_05_04_194548_create_environment_variables_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_05_17_104039_create_failed_jobs_table.php b/database/migrations/2023_05_17_104039_create_failed_jobs_table.php index 51aaa6f9f..249da8171 100644 --- a/database/migrations/2023_05_17_104039_create_failed_jobs_table.php +++ b/database/migrations/2023_05_17_104039_create_failed_jobs_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php index ed502f89f..9573b9735 100644 --- a/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php +++ b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_06_22_131459_move_wildcard_to_server.php b/database/migrations/2023_06_22_131459_move_wildcard_to_server.php index 93f559ea2..cd258fbea 100644 --- a/database/migrations/2023_06_22_131459_move_wildcard_to_server.php +++ b/database/migrations/2023_06_22_131459_move_wildcard_to_server.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_06_23_084605_remove_wildcard_domain_from_instancesettings.php b/database/migrations/2023_06_23_084605_remove_wildcard_domain_from_instancesettings.php index 67e8f6f74..a4260ce1d 100644 --- a/database/migrations/2023_06_23_084605_remove_wildcard_domain_from_instancesettings.php +++ b/database/migrations/2023_06_23_084605_remove_wildcard_domain_from_instancesettings.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_06_23_110548_next_channel_updates.php b/database/migrations/2023_06_23_110548_next_channel_updates.php index 1c2f705b9..83c4dacf3 100644 --- a/database/migrations/2023_06_23_110548_next_channel_updates.php +++ b/database/migrations/2023_06_23_110548_next_channel_updates.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_06_23_114131_change_env_var_value_length.php b/database/migrations/2023_06_23_114131_change_env_var_value_length.php index 2b0a6e159..ca8bd1e0c 100644 --- a/database/migrations/2023_06_23_114131_change_env_var_value_length.php +++ b/database/migrations/2023_06_23_114131_change_env_var_value_length.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ 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.php index 66d02e642..9c14b7c39 100644 --- 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.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_06_23_114133_use_application_deployment_queues_as_activity.php b/database/migrations/2023_06_23_114133_use_application_deployment_queues_as_activity.php index 440eca662..36623ee7b 100644 --- a/database/migrations/2023_06_23_114133_use_application_deployment_queues_as_activity.php +++ b/database/migrations/2023_06_23_114133_use_application_deployment_queues_as_activity.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_06_23_114134_add_disk_usage_percentage_to_servers.php b/database/migrations/2023_06_23_114134_add_disk_usage_percentage_to_servers.php index 09e9a6093..79846bb0a 100644 --- a/database/migrations/2023_06_23_114134_add_disk_usage_percentage_to_servers.php +++ b/database/migrations/2023_06_23_114134_add_disk_usage_percentage_to_servers.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_07_13_115117_create_subscriptions_table.php b/database/migrations/2023_07_13_115117_create_subscriptions_table.php index 5745c29e2..e24e56555 100644 --- a/database/migrations/2023_07_13_115117_create_subscriptions_table.php +++ b/database/migrations/2023_07_13_115117_create_subscriptions_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_07_13_120719_create_webhooks_table.php b/database/migrations/2023_07_13_120719_create_webhooks_table.php index f53d280c1..9376a10c9 100644 --- a/database/migrations/2023_07_13_120719_create_webhooks_table.php +++ b/database/migrations/2023_07_13_120719_create_webhooks_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_07_13_120721_add_license_to_instance_settings.php b/database/migrations/2023_07_13_120721_add_license_to_instance_settings.php index 6ecd5d971..c32cd0f9a 100644 --- a/database/migrations/2023_07_13_120721_add_license_to_instance_settings.php +++ b/database/migrations/2023_07_13_120721_add_license_to_instance_settings.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_07_27_182013_smtp_discord_schemaless_to_normal.php b/database/migrations/2023_07_27_182013_smtp_discord_schemaless_to_normal.php index 207d5e081..8bb8d7824 100644 --- a/database/migrations/2023_07_27_182013_smtp_discord_schemaless_to_normal.php +++ b/database/migrations/2023_07_27_182013_smtp_discord_schemaless_to_normal.php @@ -6,7 +6,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_08_06_142951_add_description_field_to_applications_table.php b/database/migrations/2023_08_06_142951_add_description_field_to_applications_table.php index 2bd1c428c..5be2f2959 100644 --- a/database/migrations/2023_08_06_142951_add_description_field_to_applications_table.php +++ b/database/migrations/2023_08_06_142951_add_description_field_to_applications_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_08_06_142952_remove_foreignId_environment_variables.php b/database/migrations/2023_08_06_142952_remove_foreignId_environment_variables.php index 2adf41b90..d24dbb446 100644 --- a/database/migrations/2023_08_06_142952_remove_foreignId_environment_variables.php +++ b/database/migrations/2023_08_06_142952_remove_foreignId_environment_variables.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_08_06_142954_add_readonly_localpersistentvolumes.php b/database/migrations/2023_08_06_142954_add_readonly_localpersistentvolumes.php index 1a693eee9..f0bce760d 100644 --- a/database/migrations/2023_08_06_142954_add_readonly_localpersistentvolumes.php +++ b/database/migrations/2023_08_06_142954_add_readonly_localpersistentvolumes.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_08_07_073651_create_s3_storages_table.php b/database/migrations/2023_08_07_073651_create_s3_storages_table.php index 0a7415afb..0eded3024 100644 --- a/database/migrations/2023_08_07_073651_create_s3_storages_table.php +++ b/database/migrations/2023_08_07_073651_create_s3_storages_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_08_07_142950_create_standalone_postgresqls_table.php b/database/migrations/2023_08_07_142950_create_standalone_postgresqls_table.php index 00f367de0..ddaf19a7d 100644 --- a/database/migrations/2023_08_07_142950_create_standalone_postgresqls_table.php +++ b/database/migrations/2023_08_07_142950_create_standalone_postgresqls_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. */ diff --git a/database/migrations/2023_08_08_150103_create_scheduled_database_backups_table.php b/database/migrations/2023_08_08_150103_create_scheduled_database_backups_table.php index 035f8a174..cc6726f36 100644 --- a/database/migrations/2023_08_08_150103_create_scheduled_database_backups_table.php +++ b/database/migrations/2023_08_08_150103_create_scheduled_database_backups_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ public function up(): void { Schema::create('scheduled_database_backups', function (Blueprint $table) { diff --git a/database/migrations/2023_08_10_113306_create_scheduled_database_backup_executions_table.php b/database/migrations/2023_08_10_113306_create_scheduled_database_backup_executions_table.php index 96d1f3d47..a7ecc3796 100644 --- a/database/migrations/2023_08_10_113306_create_scheduled_database_backup_executions_table.php +++ b/database/migrations/2023_08_10_113306_create_scheduled_database_backup_executions_table.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ public function up(): void { Schema::create('scheduled_database_backup_executions', function (Blueprint $table) { diff --git a/database/migrations/2023_08_10_201311_add_backup_notifications_to_teams.php b/database/migrations/2023_08_10_201311_add_backup_notifications_to_teams.php index e79563182..128aa5b25 100644 --- a/database/migrations/2023_08_10_201311_add_backup_notifications_to_teams.php +++ b/database/migrations/2023_08_10_201311_add_backup_notifications_to_teams.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ public function up(): void { Schema::table('teams', function (Blueprint $table) { diff --git a/database/seeders/EnvironmentVariableSeeder.php b/database/seeders/EnvironmentVariableSeeder.php index a6e04a33b..b09ff705e 100644 --- a/database/seeders/EnvironmentVariableSeeder.php +++ b/database/seeders/EnvironmentVariableSeeder.php @@ -11,11 +11,11 @@ class EnvironmentVariableSeeder extends Seeder */ public function run(): void { -// EnvironmentVariable::create([ -// 'key' => 'NODE_ENV', -// 'value' => 'production', -// 'is_build_time' => true, -// 'application_id' => 1, -// ]); + // EnvironmentVariable::create([ + // 'key' => 'NODE_ENV', + // 'value' => 'production', + // 'is_build_time' => true, + // 'application_id' => 1, + // ]); } } diff --git a/database/seeders/InstanceSettingsSeeder.php b/database/seeders/InstanceSettingsSeeder.php index d18c8ccbf..a00d8715c 100644 --- a/database/seeders/InstanceSettingsSeeder.php +++ b/database/seeders/InstanceSettingsSeeder.php @@ -41,4 +41,4 @@ public function run(): void echo "Error: {$e->getMessage()}\n"; } } -} \ No newline at end of file +} diff --git a/database/seeders/ProjectSettingSeeder.php b/database/seeders/ProjectSettingSeeder.php index d0a837335..2a8cdfdb4 100644 --- a/database/seeders/ProjectSettingSeeder.php +++ b/database/seeders/ProjectSettingSeeder.php @@ -8,8 +8,8 @@ class ProjectSettingSeeder extends Seeder { public function run(): void { -// $first_project = Project::find(1); + // $first_project = Project::find(1); // $first_project->settings->wildcard_domain = 'wildcard.example.com'; -// $first_project->settings->save(); + // $first_project->settings->save(); } } diff --git a/docker/dev-ssu/nginx.conf b/docker/dev-ssu/nginx.conf index 60e1f966d..f26dc3049 100644 --- a/docker/dev-ssu/nginx.conf +++ b/docker/dev-ssu/nginx.conf @@ -1,4 +1,4 @@ # Custom nginx configuration # Disable access logs -access_log off; \ No newline at end of file +access_log off; diff --git a/docker/prod-ssu/nginx.conf b/docker/prod-ssu/nginx.conf index 60e1f966d..f26dc3049 100644 --- a/docker/prod-ssu/nginx.conf +++ b/docker/prod-ssu/nginx.conf @@ -1,4 +1,4 @@ # Custom nginx configuration # Disable access logs -access_log off; \ No newline at end of file +access_log off; diff --git a/resources/views/emails/application-deployment-failed.php b/resources/views/emails/application-deployment-failed.php index 5f7ba23c2..e201d9e11 100644 --- a/resources/views/emails/application-deployment-failed.php +++ b/resources/views/emails/application-deployment-failed.php @@ -1,8 +1,7 @@ @if ($pull_request_id !== 0) -Pull Request #{{ $pull_request_id }} of {{ $name }} ({{ $fqdn }}) deployment failed: +Pull Request #{{ $pull_request_id }} of {{ $name }} ({{ $fqdn }}) deployment failed: @else Deployment failed of {{ $name }} ({{ $fqdn }}): @endif -View Deployment Logs

+View Deployment Logs

\ No newline at end of file diff --git a/resources/views/emails/application-deployment-success.php b/resources/views/emails/application-deployment-success.php index 3b622f1db..2fc84995e 100644 --- a/resources/views/emails/application-deployment-success.php +++ b/resources/views/emails/application-deployment-success.php @@ -1,8 +1,7 @@ @if ($pull_request_id === 0) A new version of {{ $fqdn }} is available: @else -Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully: Application Link | +Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully: Application Link | @endif View - Deployment Logs

+ Deployment Logs

\ No newline at end of file diff --git a/resources/views/livewire/project/database/backup-edit.blade.php b/resources/views/livewire/project/database/backup-edit.blade.php index 8644b026b..f7f7afa8e 100644 --- a/resources/views/livewire/project/database/backup-edit.blade.php +++ b/resources/views/livewire/project/database/backup-edit.blade.php @@ -4,6 +4,7 @@ Save + @if ($backup->database_id !== 0) Delete @endif diff --git a/resources/views/livewire/project/database/backup-execution.blade.php b/resources/views/livewire/project/database/backup-execution.blade.php index 60bda3d87..cf306858d 100644 --- a/resources/views/livewire/project/database/backup-execution.blade.php +++ b/resources/views/livewire/project/database/backup-execution.blade.php @@ -1,5 +1,6 @@
+ {{-- @if (data_get($execution, 'status') !== 'failed') --}} {{-- Download --}} {{-- @endif --}} diff --git a/resources/views/livewire/project/database/backup-now.blade.php b/resources/views/livewire/project/database/backup-now.blade.php new file mode 100644 index 000000000..9fa698c31 --- /dev/null +++ b/resources/views/livewire/project/database/backup-now.blade.php @@ -0,0 +1 @@ +Backup Now diff --git a/resources/views/livewire/settings/backup.blade.php b/resources/views/livewire/settings/backup.blade.php index 88febe521..f2bb18fbe 100644 --- a/resources/views/livewire/settings/backup.blade.php +++ b/resources/views/livewire/settings/backup.blade.php @@ -6,7 +6,6 @@ Save - Backup Now @endif
Backup your Coolify instance settings
@@ -30,5 +29,9 @@ Add Database @endif
+
+

Executions

+ +
diff --git a/resources/views/settings/configuration.blade.php b/resources/views/settings/configuration.blade.php index afd23a488..86e24480f 100644 --- a/resources/views/settings/configuration.blade.php +++ b/resources/views/settings/configuration.blade.php @@ -14,7 +14,7 @@
- +
diff --git a/routes/web.php b/routes/web.php index 362342dab..7e2ad9e34 100644 --- a/routes/web.php +++ b/routes/web.php @@ -68,23 +68,23 @@ }); Route::middleware(['auth'])->group(function () { - Route::get('/servers', fn() => view('server.all', [ + Route::get('/servers', fn () => view('server.all', [ 'servers' => Server::ownedByCurrentTeam()->get() ]))->name('server.all'); - Route::get('/server/new', fn() => view('server.create', [ + Route::get('/server/new', fn () => view('server.create', [ 'private_keys' => PrivateKey::ownedByCurrentTeam()->get(), ]))->name('server.create'); - Route::get('/server/{server_uuid}', fn() => view('server.show', [ + Route::get('/server/{server_uuid}', fn () => view('server.show', [ 'server' => Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(), ]))->name('server.show'); - Route::get('/server/{server_uuid}/proxy', fn() => view('server.proxy', [ + Route::get('/server/{server_uuid}/proxy', fn () => view('server.proxy', [ 'server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(), ]))->name('server.proxy'); - Route::get('/server/{server_uuid}/private-key', fn() => view('server.private-key', [ + Route::get('/server/{server_uuid}/private-key', fn () => view('server.private-key', [ 'server' => Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->firstOrFail(), 'privateKeys' => PrivateKey::ownedByCurrentTeam()->get(), ]))->name('server.private-key'); - Route::get('/server/{server_uuid}/destinations', fn() => view('server.destinations', [ + Route::get('/server/{server_uuid}/destinations', fn () => view('server.destinations', [ 'server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail() ]))->name('server.destinations'); }); @@ -95,32 +95,32 @@ Route::get('/subscription', [Controller::class, 'subscription'])->name('subscription'); Route::get('/settings', [Controller::class, 'settings'])->name('settings.configuration'); Route::get('/settings/license', [Controller::class, 'license'])->name('settings.license'); - Route::get('/profile', fn() => view('profile', ['request' => request()]))->name('profile'); + Route::get('/profile', fn () => view('profile', ['request' => request()]))->name('profile'); Route::get('/team', [Controller::class, 'team'])->name('team.show'); - Route::get('/team/new', fn() => view('team.create'))->name('team.create'); - Route::get('/team/notifications', fn() => view('team.notifications'))->name('team.notifications'); + Route::get('/team/new', fn () => view('team.create'))->name('team.create'); + Route::get('/team/notifications', fn () => view('team.notifications'))->name('team.notifications'); Route::get('/team/storages', [Controller::class, 'storages'])->name('team.storages.all'); - Route::get('/team/storages/new', fn() => view('team.storages.create'))->name('team.storages.new'); + Route::get('/team/storages/new', fn () => view('team.storages.create'))->name('team.storages.new'); Route::get('/team/storages/{storage_uuid}', [Controller::class, 'storages_show'])->name('team.storages.show'); Route::get('/team/members', [Controller::class, 'members'])->name('team.members'); - Route::get('/command-center', fn() => view('command-center', ['servers' => Server::isReachable()->get()]))->name('command-center'); + Route::get('/command-center', fn () => view('command-center', ['servers' => Server::isReachable()->get()]))->name('command-center'); Route::get('/invitations/{uuid}', [Controller::class, 'acceptInvitation'])->name('team.invitation.accept'); Route::get('/invitations/{uuid}/revoke', [Controller::class, 'revokeInvitation'])->name('team.invitation.revoke'); }); Route::middleware(['auth'])->group(function () { - Route::get('/private-keys', fn() => view('private-key.all', [ + Route::get('/private-keys', fn () => view('private-key.all', [ 'privateKeys' => PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related'])->where('is_git_related', false)->get() ]))->name('private-key.all'); - Route::get('/private-key/new', fn() => view('private-key.new'))->name('private-key.new'); - Route::get('/private-key/{private_key_uuid}', fn() => view('private-key.show', [ + Route::get('/private-key/new', fn () => view('private-key.new'))->name('private-key.new'); + Route::get('/private-key/{private_key_uuid}', fn () => view('private-key.show', [ 'private_key' => PrivateKey::ownedByCurrentTeam(['name', 'description', 'private_key', 'is_git_related'])->whereUuid(request()->private_key_uuid)->firstOrFail() ]))->name('private-key.show'); }); Route::middleware(['auth'])->group(function () { - Route::get('/source/new', fn() => view('source.new'))->name('source.new'); + Route::get('/source/new', fn () => view('source.new'))->name('source.new'); Route::get('/sources', function () { $sources = auth()->user()->currentTeam()->sources(); return view('source.all', [ diff --git a/tests/DuskTestCase.php b/tests/DuskTestCase.php index ca70aabb9..04827e5e9 100644 --- a/tests/DuskTestCase.php +++ b/tests/DuskTestCase.php @@ -41,7 +41,8 @@ protected function driver(): RemoteWebDriver return RemoteWebDriver::create( $_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515', DesiredCapabilities::chrome()->setCapability( - ChromeOptions::CAPABILITY, $options + ChromeOptions::CAPABILITY, + $options ) ); } diff --git a/tests/Feature/DockerCommandsTest.php b/tests/Feature/DockerCommandsTest.php index 2498a3af5..77e9d77e1 100644 --- a/tests/Feature/DockerCommandsTest.php +++ b/tests/Feature/DockerCommandsTest.php @@ -56,7 +56,7 @@ // Stop testing containers $activity = remote_process([ "docker ps --filter='name={$coolifyNamePrefix}*' -aq && " . - "docker rm -f $(docker ps --filter='name={$coolifyNamePrefix}*' -aq)" + "docker rm -f $(docker ps --filter='name={$coolifyNamePrefix}*' -aq)" ], $host); expect($activity->getExtraProperty('exitCode'))->toBe(0); }); diff --git a/tests/Pest.php b/tests/Pest.php index d3c836f73..50ab1e433 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -13,7 +13,7 @@ uses( Tests\TestCase::class, -// Illuminate\Foundation\Testing\RefreshDatabase::class, + // Illuminate\Foundation\Testing\RefreshDatabase::class, )->in('Feature'); /*