hermes: boot-persistent quadlet units for the gateway, dashboard, and webui

The trio ran as bare compose containers and died silently at the Aug 26
reboot — nothing restarts compose containers at boot. Each now has a
boot-persistent unit (WantedBy=default.target; the v1 quadlet generator on
this host cannot enable generated units). The deploy handler retires the
compose-era containers only while the units are not yet active, then
(re)starts each unit.

Units run the image under a localhost/hermes-agent:latest alias tag (the
quadlet create path on this host cannot resolve registry-prefixed refs from
local storage); the deploy handler tags first. The gateway's :8090 publish
is dropped — nothing consumes it; the public vhost now routes to the
dashboard's login-gated UI on 9119.
This commit is contained in:
Frank committed 2026-08-30 07:22:20 -07:00
1 parent 56763e014e
commit 915d49d663
4 files changed
+152

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
# Quadlet unit: Hermes agent gateway (rootless, boot-persistent).
#
# Install path on dankclaw: ~/.config/containers/systemd/hermes.container
# Unit name: hermes.service (container name: hermes)
#
# The messaging gateway (Signal adapter -> the host signal-cli daemon). The
# image's default s6 entrypoint would run the interactive TUI, which exits
# without a TTY; Exec= below replaces it with the headless gateway command,
# spliced by the v1 quadlet generator as trailing args after the image ref
# (same splice pattern proven live on authentik-worker). The gateway drops to
# the unprivileged hermes user (uid 10000) at runtime; /data is world-writable
# on purpose so that unmapped uid can write agent.log and its state there.
# SIGNAL_HTTP_URL uses the gateway alias, not the host LAN IP: from container
# space on this network only DNAT'd published ports accept connections to the
# LAN address; un-forwarded host ports refuse instantly (verified live
# 2026-08-30). The alias resolves to the network's own gateway IP.
[Unit]
Description=Hermes agent gateway container
After=network-online.target
Wants=network-online.target
[Container]
ContainerName=hermes
Image=localhost/hermes-agent:latest
Pull=never
Network=dankclaw_default
EnvironmentFile=/home/dank/serverAppConfigs/dankclaw/.env
Environment=HERMES_DATA_DIR=/data
Environment=HERMES_HOME=/data
Environment=SIGNAL_HTTP_URL=http://host.containers.internal:8080
Environment=SIGNAL_ACCOUNT=${SIGNAL_ACCOUNT}
Environment=SIGNAL_ALLOWED_USERS=${SIGNAL_ALLOWED_USERS}
Volume=/home/dank/hermes-data:/data
Exec=bash -c 'hermes gateway run --force -v'
[Service]
Restart=always
RestartSec=5
EnvironmentFile=/home/dank/serverAppConfigs/dankclaw/.env
[Install]
WantedBy=default.target