An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Merge branch 'main' into next
peaklabs-dev9faa4f4b7cbc
diff --cc app/Http/Controllers/OauthController.phpindex 93d27615a7,109f8915a1..a21850c9bf--- a/app/Http/Controllers/OauthController.php+++ b/app/Http/Controllers/OauthController.php@@@ -11,23 -10,44 +11,31 @@@ class OauthController extends Controlle{public function redirect(string $provider){- $socialite_provider = get_socialite_provider($provider);+ $oauthSetting = $this->enabledProvider($provider);+ $socialiteProvider = get_socialite_provider($oauthSetting->provider);- return $socialite_provider->redirect();+ return $socialiteProvider->redirect();}- public function callback(string $provider)+ public function callback(string $provider, OauthLoginService $oauthLoginService){try {- $oauthUser = get_socialite_provider($provider)->user();- $email = trim((string) $oauthUser->email);- if ($email === '') {- abort(403, 'OAuth provider did not return an email address');- }- $email = strtolower($email);- $user = User::whereEmail($email)->first();- if (! $user) {- $settings = instanceSettings();- if (! $settings->is_registration_enabled) {- abort(403, 'Registration is disabled');- }-- $user = User::create([- 'name' => $oauthUser->name,- 'email' => $email,- ]);- }- Auth::login($user);+ $oauthSetting = $this->enabledProvider($provider);+ $oauthUser = get_socialite_provider($oauthSetting->provider)->user();+ $oauthLoginService->login($oauthSetting->provider, $oauthUser, $oauthSetting);+ $team = $user->resolveStoredTeam();+ if (! $team && $user->teams()->count() === 0) {+ $team = $user->recreate_personal_team();+ }+ if ($team) {+ session(['currentTeam' => $user->currentTeam = $team]);+ }+return redirect('/');} catch (\Exception $e) {+ $this->logCallbackFailure($provider, $e);+$errorCode = $e instanceof HttpException ? 'auth.failed' : 'auth.failed.callback';return redirect()->route('login')->withErrors([__($errorCode)]);diff --cc app/Livewire/Server/Sentinel.phpindex 52010a91c4,f07799fbe5..b6444e573d--- a/app/Livewire/Server/Sentinel.php+++ b/app/Livewire/Server/Sentinel.php@@@ -51,15 -56,19 +47,13 @@@ class Sentinel extends Componen$this->validate();$this->server->settings->is_metrics_enabled = $this->isMetricsEnabled;$this->server->settings->sentinel_token = $this->sentinelToken;- $this->server->settings->sentinel_metrics_refresh_rate_seconds = $this->sentinelMetricsRefreshRateSeconds;- $this->server->settings->sentinel_metrics_history_days = $this->sentinelMetricsHistoryDays;- $this->server->settings->sentinel_push_interval_seconds = $this->sentinelPushIntervalSeconds;$this->server->settings->sentinel_custom_url = $this->sentinelCustomUrl;- $this->server->settings->is_sentinel_enabled = $this->isSentinelEnabled;$this->server->settings->is_sentinel_debug_enabled = $this->isSentinelDebugEnabled;$this->server->settings->save();} else {$this->isMetricsEnabled = $this->server->settings->is_metrics_enabled;$this->sentinelToken = $this->server->settings->sentinel_token;- $this->sentinelMetricsRefreshRateSeconds = $this->server->settings->sentinel_metrics_refresh_rate_seconds;- $this->sentinelMetricsHistoryDays = $this->server->settings->sentinel_metrics_history_days;- $this->sentinelPushIntervalSeconds = $this->server->settings->sentinel_push_interval_seconds;$this->sentinelCustomUrl = $this->server->settings->sentinel_custom_url;- $this->isSentinelEnabled = $this->server->settings->is_sentinel_enabled;$this->isSentinelDebugEnabled = $this->server->settings->is_sentinel_debug_enabled;$this->sentinelUpdatedAt = $this->server->sentinel_updated_at;}diff --cc app/Livewire/Team/Member.phpindex d99fd2eb1b,ab3f7938a1..f28087056f--- a/app/Livewire/Team/Member.php+++ b/app/Livewire/Team/Member.php@@@ -92,13 -89,8 +92,14 @@@ class Member extends ComponenDB::transaction(function () use ($teamId): void {$this->member->teams()->detach($teamId);RevokeUserTeamTokens::forUserTeam($this->member, $teamId);+ $this->member->clearStoredTeamIfMatches($teamId);});+ auditLog('ui.team_member.removed', [+ 'team_id' => $teamId,+ 'member_id' => $this->member->id,+ 'member_name' => $this->member->name,+ 'member_email' => $this->member->email,+ ]);// Clear cache for the removed user - both old and new key formatsCache::forget("team:{$this->member->id}");Cache::forget("user:{$this->member->id}:team:{$teamId}");diff --cc app/Models/Server.phpindex 3bf3ae63bc,6795c4ac90..15d790d5c9--- a/app/Models/Server.php+++ b/app/Models/Server.php@@@ -983,12 -985,7 +986,12 @@@ $siteAddressreturn $this->settings->is_metrics_enabled;}+ public function isTrafficAnalyticsEnabled(): bool+ {+ return (bool) data_get($this, 'settings.is_traffic_analytics_enabled', false);+ }+- public function isServerApiEnabled()+ public function isServerApiEnabled(): bool{return $this->settings->is_sentinel_enabled;}diff --cc resources/views/livewire/project/shared/metrics.blade.phpindex f166334236,8b0ca2b75c..17f89523e2--- a/resources/views/livewire/project/shared/metrics.blade.php+++ b/resources/views/livewire/project/shared/metrics.blade.php@@@ -24,9 -24,9 +24,9 @@@<x-external-link /></a></x-slot:actions>- <x-callout type="info" title="Metrics are not enabled">- Enable metrics for this server before collecting application usage data.- </x-callout>+ <x-empty size="sm" title="Metrics are not enabled"- description="Enable Sentinel and metrics for this server before collecting application usage data."++ description="Enable metrics for this server before collecting application usage data."+ icon-name="dashboard" /></x-application.settings-section>@elseif (!str($resource->status)->contains('running'))<x-application.settings-section id="metrics-overview-section" title="Metrics"diff --cc resources/views/livewire/server/sentinel.blade.phpindex a9f9c9c8fb,a72519a474..512b0588a9--- a/resources/views/livewire/server/sentinel.blade.php+++ b/resources/views/livewire/server/sentinel.blade.php@@@ -1,13 -1,11 +1,11 @@@<div class="application-settings-form flex w-full flex-col gap-6"><form wire:submit.prevent="submit" class="contents">- @if ($isSentinelEnabled)- {{-- Scope dirty tracking to savable form fields only. Without wire:target,- Livewire compares the entire component snapshot — so dev-only x-init- `$wire.set('sentinelCustomDockerImage', …)` (and similar) briefly- flashes this bar on every page open. --}}- <x-unsaved-bar action="submit"- targets="sentinelCustomUrl,sentinelToken" />- @endif+ {{-- Scope dirty tracking to savable form fields only. Without wire:target,+ Livewire compares the entire component snapshot — so dev-only x-init+ `$wire.set('sentinelCustomDockerImage', …)` (and similar) briefly+ flashes this bar on every page open. --}}+ <x-unsaved-bar action="submit"- targets="sentinelCustomUrl,sentinelToken,sentinelMetricsRefreshRateSeconds,sentinelMetricsHistoryDays,sentinelPushIntervalSeconds" />++ targets="sentinelCustomUrl,sentinelToken" /><x-application.settings-section id="server-sentinel-overview-section" title="Sentinel"helper="Monitor server and container health while collecting historical metrics.">diff --cc routes/web.phpindex 95ceff53f1,30a9634d4d..2a0b66a2ac--- a/routes/web.php+++ b/routes/web.php@@@ -50,11 -49,10 +50,12 @@@ use App\Livewire\Security\CloudInitScriuse App\Livewire\Security\CloudInitScripts;use App\Livewire\Security\CloudProviderToken\Show as SecurityCloudProviderTokenShow;use App\Livewire\Security\CloudTokens;+use App\Livewire\Security\IntegrationTokens;use App\Livewire\Security\PrivateKey\Index as SecurityPrivateKeyIndex;use App\Livewire\Security\PrivateKey\Show as SecurityPrivateKeyShow;+ use App\Livewire\SelectTeam;use App\Livewire\Server\Advanced as ServerAdvanced;+use App\Livewire\Server\Analytics\Show as ServerAnalytics;use App\Livewire\Server\CaCertificate\Show as CaCertificateShow;use App\Livewire\Server\Charts as ServerCharts;use App\Livewire\Server\CloudflareTunnel;