Open saltydk opened 7 months ago
How about a table? Something like:
+-------------------+-------------------+-------+------------------------+
| Container | Traefik Service | Port | Port Bindings |
+-------------------+-------------------+-------+------------------------+
| authelia | authelia | 9091 | No port bindings |
| lldap | lldap | 17170 | No port bindings |
| plex | plex-webtools | 33400 | No port bindings |
| | plex | 32400 | |
| radarr | radarr | 7878 | No port bindings |
| rutorrent | rutorrent | 80 | 51413/tcp -> 51413, |
| | | | 51413/udp -> 51413, |
| | | | 6881/udp -> 6881 |
| traefik | None | None | 443/tcp -> 443, |
| | | | 443/udp -> 443, |
| | | | 80/tcp -> 80 |
+-------------------+-------------------+-------+------------------------+
+-------------------+-------------------+-------------------+-------------------+
| Container | Traefik Service | Port | Port Bindings |
+-------------------+-------------------+-------------------+-------------------+
| radarrjapanese | radarrjapanese | 7878 | |
+-------------------+-------------------+-------------------+-------------------+
| radarrkorean | radarrkorean | 7878 | |
+-------------------+-------------------+-------------------+-------------------+
| radarranime | radarranime | 7878 | |
+-------------------+-------------------+-------------------+-------------------+
| radarrdanish | radarrdanish | 7878 | |
+-------------------+-------------------+-------------------+-------------------+
| radarr4k | radarr4k | 7878 | |
+-------------------+-------------------+-------------------+-------------------+
| radarr | radarr | 7878 | |
+-------------------+-------------------+-------------------+-------------------+
| sonarrjapanese | sonarrjapanese | 8989 | |
+-------------------+-------------------+-------------------+-------------------+
| sonarrkorean | sonarrkorean | 8989 | |
+-------------------+-------------------+-------------------+-------------------+
| sonarrdanish | sonarrdanish | 8989 | |
+-------------------+-------------------+-------------------+-------------------+
| sonarranime | sonarranime | 8989 | |
+-------------------+-------------------+-------------------+-------------------+
| sonarr | sonarr | 8989 | |
+-------------------+-------------------+-------------------+-------------------+
| prowlarr | prowlarr | 9696 | |
+-------------------+-------------------+-------------------+-------------------+
| jackett | jackett | 9117 | |
+-------------------+-------------------+-------------------+-------------------+
| autobrr | autobrr | 7474 | |
+-------------------+-------------------+-------------------+-------------------+
| netdata | netdata | 19999 | |
+-------------------+-------------------+-------------------+-------------------+
| your-spotify | your-spotify | 80 | |
+-------------------+-------------------+-------------------+-------------------+
| omegabrr | omegabrr | 7441 | |
+-------------------+-------------------+-------------------+-------------------+
| pgadmin | pgadmin | 80 | |
+-------------------+-------------------+-------------------+-------------------+
| traefik | | | 443/tcp |
| | | | 443/udp |
| | | | 80/tcp |
+-------------------+-------------------+-------------------+-------------------+
| dozzle | dozzle | 8080 | |
+-------------------+-------------------+-------------------+-------------------+
| portainer | portainer | 9000 | |
+-------------------+-------------------+-------------------+-------------------+
Something like that?
I like yours salty. I came up w this :p kinda ugly. I feel like i should leave this up to the adults. I can drop the "no port bindings" and the -> port
but yours is pertier.
+-------------------+--------------------------+-------------------------+
| Container | Traefik Service and Port | Port Bindings |
+-------------------+--------------------------+-------------------------+
| authelia | authelia: 9091 | No port bindings |
| ----------- | ----------- | ----------- |
| autobrr | autobrr: 7474 | No port bindings |
| ----------- | ----------- | ----------- |
| immich | immich: 3001 | No port bindings |
| ----------- | ----------- | ----------- |
| lgsm_pw | None | 27015/udp -> 27015, |
| | | 8211/udp -> 8211 |
| ----------- | ----------- | ----------- |
| lldap | lldap: 17170 | No port bindings |
| ----------- | ----------- | ----------- |
| notifiarr | notifiarr: 5454 | No port bindings |
| ----------- | ----------- | ----------- |
| omegabrr | omegabrr: 7441 | No port bindings |
| ----------- | ----------- | ----------- |
| overseerr | overseerr: 5055 | No port bindings |
| ----------- | ----------- | ----------- |
| prowlarr | prowlarr: 9696 | No port bindings |
| ----------- | ----------- | ----------- |
| qbittorrent | qbittorrent: 8080 | 56881/tcp -> 56881, |
| | | 56881/udp -> 56881 |
| ----------- | ----------- | ----------- |
| radarr | radarr: 7878 | No port bindings |
| ----------- | ----------- | ----------- |
| radarr4k | radarr4k: 7878 | No port bindings |
| ----------- | ----------- | ----------- |
| radarranime | radarranime: 7878 | No port bindings |
| ----------- | ----------- | ----------- |
| sabnzbd | sabnzbd: 8080 | No port bindings |
| ----------- | ----------- | ----------- |
| sonarr | sonarr: 8989 | No port bindings |
| ----------- | ----------- | ----------- |
| sonarr4k | sonarr4k: 8989 | No port bindings |
| ----------- | ----------- | ----------- |
| sonarranime | sonarranime: 8989 | No port bindings |
| ----------- | ----------- | ----------- |
| traefik | None | 443/tcp -> 443, 443/udp |
| | | -> 443, 80/tcp -> 80 |
| ----------- | ----------- | ----------- |
| traefik-robotstxt | robotstxt: 8080 | No port bindings |
| ----------- | ----------- | ----------- |
| vaultwarden | vaultwarden: 6423 | No port bindings |
+-------------------+--------------------------+-------------------------+
@https://github.com/saltyorg/sb/issues/18#issuecomment-1935192399
Yes, even better with row dividers. Could also cut down the headers a bit so they stand out more (or less?):
Container Traefik Service Port Port Bindings
+-------------------+-------------------+-------------------+-------------------+
| omegabrr | omegabrr | 7441 | |
+-------------------+-------------------+-------------------+-------------------+
| pgadmin | pgadmin | 80 | |
+-------------------+-------------------+-------------------+-------------------+
| traefik | | | 443/tcp |
| | | | 443/udp |
| | | | 80/tcp |
+-------------------+-------------------+-------------------+-------------------+
| dozzle | dozzle | 8080 | |
+-------------------+-------------------+-------------------+-------------------+
| portainer | portainer | 9000 | |
+-------------------+-------------------+-------------------+-------------------+
Unicode version:
Container Traefik Service Port Port Bindings
┌───────────────────┼───────────────────┼───────────────────┼───────────────────┐
│ omegabrr │ omegabrr │ 7441 │ │
├───────────────────┼───────────────────┼───────────────────┼───────────────────┤
│ pgadmin │ pgadmin │ 80 │ │
├───────────────────┼───────────────────┼───────────────────┼───────────────────┤
│ traefik │ │ │ 443/tcp │
│ │ │ │ 443/udp │
│ │ │ │ 80/tcp │
├───────────────────┼───────────────────┼───────────────────┼───────────────────┤
│ dozzle │ dozzle │ 8080 │ │
├───────────────────┼───────────────────┼───────────────────┼───────────────────┤
│ portainer │ portainer │ 9000 │ │
└───────────────────┴───────────────────┴───────────────────┴───────────────────┘
I like them sorted :p
Sorting is a given. The question is by which attribute first, container? port?
There will be a single container lookup argument anyway, so we won't need sorting to find a specific thing, at least.
isn't the idea to have either a single container lookup or lookup all? in which case alphabetical sort might be nice. like sb ports
or sb ports sabnzbd
?
I tried with and without alphabetical sort by container name and I think readability is cleaner with alphabetical. I don't think there's much use for sorting by port, but I could be wrong.
"Cleaner" I don't see how, and again, I can't think of a practical use for sorting the full list by `container` besides finding a specific row more easily—a use case the single container lookup already covers—but let me know if there is one.
On the other hand, it might be interesting to have a quick notion of which containers use the same listening port, for that limited use case where a user might want to publish them and avoid conflicts at least. Idk.
Add one or several commands related to identifying what hostname and port to use for a given role/install.
Some boilerplate Python:
Not the best format as far as the output so could use some formatting suggestions as to what we want this to output both as a single container lookup and as a look at everything installed output.