mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-27 07:31:46 +01:00
feat: supports swarm mode with stacks and services on remote hosts 🙌🏼 (#2961)
This commit is contained in:
@@ -213,6 +213,12 @@ func (d *httpClient) ListContainers() ([]Container, error) {
|
||||
if len(c.Names) > 0 {
|
||||
name = strings.TrimPrefix(c.Names[0], "/")
|
||||
}
|
||||
|
||||
group := ""
|
||||
if c.Labels["dev.dozzle.group"] != "" {
|
||||
group = c.Labels["dev.dozzle.group"]
|
||||
}
|
||||
|
||||
container := Container{
|
||||
ID: c.ID[:12],
|
||||
Names: c.Names,
|
||||
@@ -227,6 +233,7 @@ func (d *httpClient) ListContainers() ([]Container, error) {
|
||||
Health: findBetweenParentheses(c.Status),
|
||||
Labels: c.Labels,
|
||||
Stats: utils.NewRingBuffer[ContainerStat](300), // 300 seconds of stats
|
||||
Group: group,
|
||||
}
|
||||
containers = append(containers, container)
|
||||
}
|
||||
@@ -303,7 +310,7 @@ func (d *httpClient) ContainerLogs(ctx context.Context, id string, since string,
|
||||
ShowStdout: stdType&STDOUT != 0,
|
||||
ShowStderr: stdType&STDERR != 0,
|
||||
Follow: true,
|
||||
Tail: "300",
|
||||
Tail: strconv.Itoa(100),
|
||||
Timestamps: true,
|
||||
Since: since,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user