mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-01 03:55:22 +02:00
Compare commits
1 Commits
canary
...
fix/branch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90515fd595 |
@@ -69,12 +69,14 @@ export const columns: ColumnDef<LogEntry>[] = [
|
||||
const log = row.original;
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex items-center flex-row flex-wrap gap-3 ">
|
||||
<div className="flex items-center flex-row gap-3 ">
|
||||
{log.RequestMethod}{" "}
|
||||
<div className="inline-flex items-center gap-2 bg-muted px-1.5 py-1 rounded-lg">
|
||||
<span>{log.RequestAddr}</span>
|
||||
</div>
|
||||
<span className="break-all">{log.RequestPath}</span>
|
||||
{log.RequestPath.length > 100
|
||||
? `${log.RequestPath.slice(0, 82)}...`
|
||||
: log.RequestPath}
|
||||
</div>
|
||||
<div className="flex flex-row gap-3 w-full">
|
||||
<Badge
|
||||
|
||||
@@ -32,19 +32,7 @@ export const startLogCleanup = async (
|
||||
await execAsync(
|
||||
`tail -n 1000 ${accessLogPath} > ${accessLogPath}.tmp && mv ${accessLogPath}.tmp ${accessLogPath}`,
|
||||
);
|
||||
|
||||
// Traefik can run as a standalone container ("dokploy-traefik") or a
|
||||
// swarm service task ("dokploy-traefik.1.<task-id>"), so resolve the
|
||||
// running container id dynamically instead of assuming the name.
|
||||
const { stdout: containerId } = await execAsync(
|
||||
'docker ps -q --filter "name=dokploy-traefik" --filter "status=running" | head -n 1',
|
||||
);
|
||||
const traefikContainerId = containerId.trim();
|
||||
if (!traefikContainerId) {
|
||||
console.error("Traefik container not found, skipping log reopen");
|
||||
return;
|
||||
}
|
||||
await execAsync(`docker exec ${traefikContainerId} kill -USR1 1`);
|
||||
await execAsync("docker exec dokploy-traefik kill -USR1 1");
|
||||
} catch (error) {
|
||||
console.error("Error during log cleanup:", error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user