From e193490b9ffd96a90ed85add5ab62340889ee1e9 Mon Sep 17 00:00:00 2001 From: ShadowArcanist Date: Mon, 29 Sep 2025 05:26:02 +0530 Subject: [PATCH 01/31] Fixed incorrect caddy proxy config file path on ui --- app/Livewire/Server/Proxy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Server/Proxy.php b/app/Livewire/Server/Proxy.php index 5ef559862..9b345181c 100644 --- a/app/Livewire/Server/Proxy.php +++ b/app/Livewire/Server/Proxy.php @@ -43,9 +43,9 @@ public function mount() $this->redirectUrl = data_get($this->server, 'proxy.redirect_url'); } - public function getConfigurationFilePathProperty() + public function getConfigurationFilePathProperty(): string { - return $this->server->proxyPath().'docker-compose.yml'; + return rtrim($this->server->proxyPath(), '/') . '/docker-compose.yml'; } public function changeProxy() From b39690dfa2b1272d2ca9e07b59752d2956dcc77e Mon Sep 17 00:00:00 2001 From: ShadowArcanist Date: Thu, 9 Oct 2025 13:26:10 +0530 Subject: [PATCH 02/31] Changed docker --time command to -t since --time is deprecated on v28 --- app/Actions/Application/StopApplication.php | 2 +- app/Actions/Application/StopApplicationOneServer.php | 2 +- app/Actions/Database/StopDatabase.php | 2 +- app/Actions/Proxy/StopProxy.php | 2 +- app/Actions/Service/StopService.php | 2 +- app/Jobs/ApplicationDeploymentJob.php | 2 +- app/Jobs/DeleteResourceJob.php | 2 +- app/Livewire/Project/Application/Previews.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Actions/Application/StopApplication.php b/app/Actions/Application/StopApplication.php index ee3398b04..94651a3c1 100644 --- a/app/Actions/Application/StopApplication.php +++ b/app/Actions/Application/StopApplication.php @@ -39,7 +39,7 @@ public function handle(Application $application, bool $previewDeployments = fals foreach ($containersToStop as $containerName) { instant_remote_process(command: [ - "docker stop --time=30 $containerName", + "docker stop -t 30 $containerName", "docker rm -f $containerName", ], server: $server, throwError: false); } diff --git a/app/Actions/Application/StopApplicationOneServer.php b/app/Actions/Application/StopApplicationOneServer.php index 600b1cb9a..bf9fdee72 100644 --- a/app/Actions/Application/StopApplicationOneServer.php +++ b/app/Actions/Application/StopApplicationOneServer.php @@ -26,7 +26,7 @@ public function handle(Application $application, Server $server) if ($containerName) { instant_remote_process( [ - "docker stop --time=30 $containerName", + "docker stop -t 30 $containerName", "docker rm -f $containerName", ], $server diff --git a/app/Actions/Database/StopDatabase.php b/app/Actions/Database/StopDatabase.php index 5c881e743..c024c14e1 100644 --- a/app/Actions/Database/StopDatabase.php +++ b/app/Actions/Database/StopDatabase.php @@ -49,7 +49,7 @@ private function stopContainer($database, string $containerName, int $timeout = { $server = $database->destination->server; instant_remote_process(command: [ - "docker stop --time=$timeout $containerName", + "docker stop -t $timeout $containerName", "docker rm -f $containerName", ], server: $server, throwError: false); } diff --git a/app/Actions/Proxy/StopProxy.php b/app/Actions/Proxy/StopProxy.php index 29cc63b40..310185473 100644 --- a/app/Actions/Proxy/StopProxy.php +++ b/app/Actions/Proxy/StopProxy.php @@ -21,7 +21,7 @@ public function handle(Server $server, bool $forceStop = true, int $timeout = 30 ProxyStatusChangedUI::dispatch($server->team_id); instant_remote_process(command: [ - "docker stop --time=$timeout $containerName", + "docker stop -t $timeout $containerName", "docker rm -f $containerName", ], server: $server, throwError: false); diff --git a/app/Actions/Service/StopService.php b/app/Actions/Service/StopService.php index 3f4e96479..23b41e3f2 100644 --- a/app/Actions/Service/StopService.php +++ b/app/Actions/Service/StopService.php @@ -54,7 +54,7 @@ private function stopContainersInParallel(array $containersToStop, Server $serve $timeout = count($containersToStop) > 5 ? 10 : 30; $commands = []; $containerList = implode(' ', $containersToStop); - $commands[] = "docker stop --time=$timeout $containerList"; + $commands[] = "docker stop -t $timeout $containerList"; $commands[] = "docker rm -f $containerList"; instant_remote_process( command: $commands, diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 8ffaabde5..381857f83 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -2890,7 +2890,7 @@ private function graceful_shutdown_container(string $containerName) try { $timeout = isDev() ? 1 : 30; $this->execute_remote_command( - ["docker stop --time=$timeout $containerName", 'hidden' => true, 'ignore_errors' => true], + ["docker stop -t $timeout $containerName", 'hidden' => true, 'ignore_errors' => true], ["docker rm -f $containerName", 'hidden' => true, 'ignore_errors' => true] ); } catch (Exception $error) { diff --git a/app/Jobs/DeleteResourceJob.php b/app/Jobs/DeleteResourceJob.php index b9fbebcc9..45f113d96 100644 --- a/app/Jobs/DeleteResourceJob.php +++ b/app/Jobs/DeleteResourceJob.php @@ -153,7 +153,7 @@ private function stopPreviewContainers(array $containers, $server, int $timeout $containerList = implode(' ', array_map('escapeshellarg', $containerNames)); $commands = [ - "docker stop --time=$timeout $containerList", + "docker stop -t $timeout $containerList", "docker rm -f $containerList", ]; diff --git a/app/Livewire/Project/Application/Previews.php b/app/Livewire/Project/Application/Previews.php index 1cb2ef2c5..7a6e8c415 100644 --- a/app/Livewire/Project/Application/Previews.php +++ b/app/Livewire/Project/Application/Previews.php @@ -237,7 +237,7 @@ private function stopContainers(array $containers, $server) foreach ($containersToStop as $containerName) { instant_remote_process(command: [ - "docker stop --time=30 $containerName", + "docker stop -t 30 $containerName", "docker rm -f $containerName", ], server: $server, throwError: false); } From 0f9e3b84eea343ec2a0d2024231fef705fe8f923 Mon Sep 17 00:00:00 2001 From: ShadowArcanist Date: Thu, 20 Nov 2025 08:09:09 +0530 Subject: [PATCH 03/31] feat: logs color highlight based on log level - visual improvement --- app/Livewire/Project/Shared/GetLogs.php | 2 +- .../project/shared/get-logs.blade.php | 36 +++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/Livewire/Project/Shared/GetLogs.php b/app/Livewire/Project/Shared/GetLogs.php index 304f7b411..3ed2befba 100644 --- a/app/Livewire/Project/Shared/GetLogs.php +++ b/app/Livewire/Project/Shared/GetLogs.php @@ -39,7 +39,7 @@ class GetLogs extends Component public ?bool $streamLogs = false; - public ?bool $showTimeStamps = true; + public ?bool $showTimeStamps = false; public ?int $numberOfLines = 100; diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php index 2aff4fc1c..3877721a5 100644 --- a/resources/views/livewire/project/shared/get-logs.blade.php +++ b/resources/views/livewire/project/shared/get-logs.blade.php @@ -102,9 +102,41 @@ @if ($outputs) -
{{ $outputs }}
+
+ @foreach(explode("\n", trim($outputs)) as $line) + @if(!empty(trim($line))) + @php + $lowerLine = strtolower($line); + $isError = str_contains($lowerLine, 'error') || str_contains($lowerLine, 'err') || str_contains($lowerLine, 'failed') || str_contains($lowerLine, 'exception'); + $isWarning = str_contains($lowerLine, 'warn') || str_contains($lowerLine, 'warning') || str_contains($lowerLine, 'wrn'); + $isDebug = str_contains($lowerLine, 'debug') || str_contains($lowerLine, 'dbg') || str_contains($lowerLine, 'trace'); + $barColor = $isError ? 'bg-red-500 dark:bg-red-400' : ($isWarning ? 'bg-yellow-500 dark:bg-yellow-400' : ($isDebug ? 'bg-purple-500 dark:bg-purple-400' : 'bg-blue-500 dark:bg-blue-400')); + $bgColor = $isError ? 'bg-red-50/50 dark:bg-red-900/20 hover:bg-red-100/50 dark:hover:bg-red-800/30' : ($isWarning ? 'bg-yellow-50/50 dark:bg-yellow-900/20 hover:bg-yellow-100/50 dark:hover:bg-yellow-800/30' : ($isDebug ? 'bg-purple-50/50 dark:bg-purple-900/20 hover:bg-purple-100/50 dark:hover:bg-purple-800/30' : 'bg-blue-50/50 dark:bg-blue-900/20 hover:bg-blue-100/50 dark:hover:bg-blue-800/30')); + + // Check for timestamp at the beginning (ISO 8601 format) + $timestampPattern = '/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+/'; + $hasTimestamp = preg_match($timestampPattern, $line, $matches); + $timestamp = $hasTimestamp ? $matches[1] : null; + $logContent = $hasTimestamp ? preg_replace($timestampPattern, '', $line) : $line; + @endphp +
+
+
+ @if($hasTimestamp) + {{ $timestamp }} + {{ $logContent }} + @else + {{ $line }} + @endif +
+
+ @endif + @endforeach +
@else -
Refresh to get the logs...
+
+ Refresh to get the logs... +
@endif From 86ac33189d0cbf099cf1eb04092d87311bd0fe34 Mon Sep 17 00:00:00 2001 From: ShadowArcanist Date: Thu, 20 Nov 2025 09:35:00 +0530 Subject: [PATCH 04/31] fix: improved regex to support timestamps with either "T" or space separators on logs to differentiate timestamps from actual log content --- resources/views/livewire/project/shared/get-logs.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php index 3877721a5..bd011bac5 100644 --- a/resources/views/livewire/project/shared/get-logs.blade.php +++ b/resources/views/livewire/project/shared/get-logs.blade.php @@ -114,7 +114,7 @@ $bgColor = $isError ? 'bg-red-50/50 dark:bg-red-900/20 hover:bg-red-100/50 dark:hover:bg-red-800/30' : ($isWarning ? 'bg-yellow-50/50 dark:bg-yellow-900/20 hover:bg-yellow-100/50 dark:hover:bg-yellow-800/30' : ($isDebug ? 'bg-purple-50/50 dark:bg-purple-900/20 hover:bg-purple-100/50 dark:hover:bg-purple-800/30' : 'bg-blue-50/50 dark:bg-blue-900/20 hover:bg-blue-100/50 dark:hover:bg-blue-800/30')); // Check for timestamp at the beginning (ISO 8601 format) - $timestampPattern = '/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+/'; + $timestampPattern = '/^(\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+/'; $hasTimestamp = preg_match($timestampPattern, $line, $matches); $timestamp = $hasTimestamp ? $matches[1] : null; $logContent = $hasTimestamp ? preg_replace($timestampPattern, '', $line) : $line; From 8911af04144b72ed928e08bbe4495d6af54df4cd Mon Sep 17 00:00:00 2001 From: ShadowArcanist Date: Thu, 20 Nov 2025 10:23:05 +0530 Subject: [PATCH 05/31] feat: improve new resource selection UI layout and styling --- .../views/components/resource-view.blade.php | 20 ++--- .../livewire/project/new/select.blade.php | 78 ++++++++++--------- 2 files changed, 50 insertions(+), 48 deletions(-) diff --git a/resources/views/components/resource-view.blade.php b/resources/views/components/resource-view.blade.php index ff8e99074..db8360fac 100644 --- a/resources/views/components/resource-view.blade.php +++ b/resources/views/components/resource-view.blade.php @@ -1,27 +1,23 @@ -
!$upgrade, +
!$upgrade, 'hover:border-l-red-500 cursor-not-allowed' => $upgrade, -])> + ])>
-
+
{{ $logo }}
-
-
+
+
{{ $title }}
@if ($upgrade)
{{ $upgrade }}
@else -
+
{{ $description }}
@endif
- @isset($documentation) -
- {{ $documentation }} - @endisset
diff --git a/resources/views/livewire/project/new/select.blade.php b/resources/views/livewire/project/new/select.blade.php index 9e2af21cc..2a974c763 100644 --- a/resources/views/livewire/project/new/select.blade.php +++ b/resources/views/livewire/project/new/select.blade.php @@ -66,44 +66,49 @@ class="px-3 py-2 cursor-pointer hover:bg-neutral-100 dark:hover:bg-coolgray-200
Loading...

Applications

-

Git Based

-
- -
-

Docker Based

-
- +
-

Databases

+
+

Databases

+ class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-3">
-
+
+

Services

Reload List @@ -132,7 +138,7 @@ class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-2"> href="https://coolify.io/docs/services/overview">here.
-
+