Merge branch 'next' into feat-db-ssl

This commit is contained in:
🏔️ Peak
2025-02-07 23:01:46 +01:00
committed by GitHub
42 changed files with 408 additions and 95 deletions

View File

@@ -852,6 +852,23 @@ function validateComposeFile(string $compose, int $server_id): string|Throwable
}
}
function getContainerLogs(Server $server, string $container_id, int $lines = 100): string
{
if ($server->isSwarm()) {
$output = instant_remote_process([
"docker service logs -n {$lines} {$container_id}",
], $server);
} else {
$output = instant_remote_process([
"docker logs -n {$lines} {$container_id}",
], $server);
}
$output .= removeAnsiColors($output);
return $output;
}
function escapeEnvVariables($value)
{
$search = ['\\', "\r", "\t", "\x0", '"', "'"];

View File

@@ -440,11 +440,7 @@ function sslip(Server $server)
function get_service_templates(bool $force = false): Collection
{
if (isDev()) {
$services = File::get(base_path('templates/service-templates.json'));
return collect(json_decode($services))->sortKeys();
}
if ($force) {
try {
$response = Http::retry(3, 1000)->get(config('constants.services.official'));