- Crystal 67.5%
- CSS 12.5%
- JavaScript 10.4%
- HTML 9.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| spec | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| Containerfile.dev | ||
| Containerfile.prod | ||
| endash.webp | ||
| LICENSE | ||
| pods.yaml | ||
| README.md | ||
| shard.lock | ||
| shard.yml | ||
endash
Container dashboard for Podman
Installation
You'll have to build this one yourself. I build it using pod but you can just use podman build if you want.
$ git clone https://codeberg.com/willhbr/endash.git
$ cd endash
$ podman build --tag=endash:prod-latest --file=Containerfile.prod .
You could also run it outside of a container, but that's not what the artist intended.
Usage
endash does not store any state, and is configured by command-line flags. The --host flag is a JSON object that is repeated for each podman-remote host to show connections from. For example:
$ ./endash '--host={"name": "localhost", "hostname": "localhost", "podman_url": "unix:///run/user/podman/podman.sock"}'
If you use pod you can write the flags as YAML and they'll get auto-translated to JSON (that's the whole point of this feature).
To connect to podman on the same machine:
host:
name: localhost
hostname: localhost
podman_url: "unix:///run/user/podman/podman.sock"
container_refresh: 5m
You may need to change podman_url if you're running rootless.
To connect to a remote machine:
host:
address: homelab
podman_url: "ssh://will@homelab:22/run/user/1000/podman/podman.sock"
identity: /var/run/secrets/homelab-ssh-key
container_refresh: 10m
To run endash in a container, you'll need to bind mount the podman socket. If you want to access a remote machine, either bind mount your .ssh directory or use podman secrets to manage the private key.
Here's a config that I use:
containers:
endash:
remote: ibex
image: endash:prod-latest
ports:
5049: 80
bind_mounts:
/home/prod/podman.sock: /run/user/podman/podman.sock
run_flags:
restart: always
secrets:
- ibex-ssh-key
- badger-ssh-key
flags:
ignore_systemd_sleep: true
args:
- --
- address: badger
podman_url: "ssh://prod@badger:22/home/prod/podman.sock"
identity: /var/run/secrets/badger-ssh-key
container_refresh: 15m
ui_shows_cached: true
timeout: 20s
use_events: true
- address: ibex
podman_url: "unix:///run/user/podman/podman.sock"
container_refresh: 5m
use_events: true
- address: brett
podman_url: "ssh://will@brett:22/run/user/1000/podman/podman.sock"
identity: /var/run/secrets/ibex-ssh-key
container_refresh: 10m
use_events: true
# Endash uses labels to expose links and prometheus info
labels:
# Will advertise /metrics on whatever the host port for :80 is
prometheus.port: 80
# These are added to the service definition verbatim
prometheus.labels:
__scrape_interval__: 10m
# Links are auto-mapped to the corresponding public port
# Any exposed ports are automatically added as links if they're not given a label
endash.links:
- name: Status
port: 80
path: /status
- name: Dash
port: 80
I use this config in Prometheus to enable service discovery:
scrape_configs:
- job_name: endash
http_sd_configs:
- url: http://host.containers.internal:5049/prometheus
host.containers.internal allows the prometheus container (running on the same host as endash) to access ports on the host. Any new container on any host with the prometheus.port label will be picked up automatically.
Contributors
- Will Richardson - creator and maintainer
