Merge branch 'next' into feat-db-ssl
This commit is contained in:
@@ -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", '"', "'"];
|
||||
|
||||
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user