glance
glance copied to clipboard
Feat: Added support for configuring Docker containers through glance.yaml instead of labels
To address this feature: https://github.com/glanceapp/glance/issues/452
Before:
After:
Sample glance.yml used during testing:
pages:
- name: Startpage
width: slim
hide-desktop-navigation: true
center-vertically: true
columns:
- size: full
widgets:
- type: search
autofocus: true
- type: docker-containers
hide-by-default: false
readable-names: true
containers:
glance: # This is the actual container name
title: "Test Glances Name"
description: "test-description"
url: "127.0.0.1:3011/test"
icon: "si:jellyfin"
hide: false
Where an existing docker container with the name glance is running.
Hey, thanks for contributing!
This is something I want to add support for, however before doing that I think we need to have a discussion around how it would work in conjunction with this feature, since that does mean that you may end up with multiple containers having the same name.
@svilenmarkov I think one way we can support this with the feature you linked is to extend it by adding an optional name property to the config:
- type: docker-containers
providers:
- name: glance-socket
- type: proxy
host: tcp://glance-socket-proxy:2375
- type: proxy
host: tcp://some-other-server:2375
Then we can specify the provider here if needed:
containers:
glance: # This is the actual container name
provider: glance-socket
title: "Test Glances Name"
description: "test-description"
url: "127.0.0.1:3011/test"
icon: "si:jellyfin"
hide: false
If a provider or name aren't included the rename mapping will just happen for every container that matches the name in the overrides.
Or we can even extend the name to just have the provider name included as part of the human readable option. E.g. using the above config:
Glance [glance-socket]
How does that sound?
i like arrays more
containers:
- name: glance # This is the actual container name
provider: glance-socket
title: "Test Glances Name"
...