mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 10:05:47 -05:00
fix(docker): log docker stop command only in local development
Log the generated docker stop command and Docker version when running locally so developers can inspect version-aware flags. Skip logging outside local development.
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\Server;
|
||||
use App\Models\ServiceApplication;
|
||||
use App\Support\ValidationPatterns;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
use Spatie\Url\Url;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
@@ -251,7 +252,16 @@ function dockerStopCommand(int $timeout, string $containers, Server|string|null
|
||||
? "--timeout={$timeout}"
|
||||
: "--time={$timeout}";
|
||||
|
||||
return "docker stop {$flag} {$containers}";
|
||||
$command = "docker stop {$flag} {$containers}";
|
||||
|
||||
if (app()->bound('config') && isDev()) {
|
||||
Log::info('docker stop command', [
|
||||
'command' => $command,
|
||||
'docker_version' => $version,
|
||||
]);
|
||||
}
|
||||
|
||||
return $command;
|
||||
}
|
||||
function escapeShellValue(string $value): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user