Fluxheim/文件/systemd 同容器

systemd 同容器

native host 用 systemd;需要隔離 deployment 時用 rootless container。

rootless Podman

podman run --name fluxheim --replace \
  -p 8080:8080 \
  -v ./fluxheim.toml:/etc/fluxheim/fluxheim.toml:ro \
  -v ./site:/srv/site:ro \
  -v fluxheim-cache:/var/cache/fluxheim \
  ghcr.io/valkyoth/fluxheim:v1.8.0

container mount

掛載Recommended mode
設定唯讀 bind mount.
Static 內容唯讀 bind mount.
ACME狀態持久可寫卷。
Disk cache使用容量配合 cache policy 嘅持久 writable volume。每個 storage-bin replica 都要有自己嘅 local 或 RWO volume;共享 RWX storage 只可以喺跨 node locking 已驗證,而且 orchestration 層強制 single-writer 時使用。
秘密Container secret or credentials directory, not a 公開 file.

systemd 流程

fluxheim --config /etc/fluxheim/fluxheim.toml --check-config
sudo systemctl restart fluxheim
sudo systemctl status fluxheim
journalctl -u fluxheim -n 100 --no-pager

零停機升級

用 systemd socket 啟動之後,Fluxheim 喺驗證新程序同等現有連線完成處理期間,對外嘅監聽端點仍然可以繼續接收連線。直接發布主機連接埠嘅容器冇辦法喺監聽不中斷嘅情況下更換,所以需要穩定嘅前置 Proxy、負載平衡器或者容器編排平台。

睇完整嘅升級規範

Production 檢查清單

  • 固定發布版本或圖像摘要。
  • 將 config 同 content 以 read-only 掛載。
  • Keep ACME and cache state on persistent volumes.
  • 驗證 config against the profile you plan to run.
  • Keep 健康檢查 and rollback commands ready before changing 流量.
粵語