Quadlet 配置分享:AxonHub
目录
本文属于「quadlet 配置分享」系列,直接贴配置,不讲 Quadlet 基础。入门见 Podman 教程。
AxonHub
AxonHub 是开源 AI Gateway,用任意 SDK 调用 100+ 模型,内置故障转移、负载均衡、成本追踪和全链路 Tracing。
配置
AxonHub 作为 API 网关,推荐用 PostgreSQL。
# axonhub.pod
[Pod]
PublishPort=8090:8090
UserNS=keep-id
[Install]
WantedBy=default.target# axonhub.container
[Unit]
Requires=axonhub-postgres.service
After=axonhub-postgres.service
[Container]
Image=docker.io/looplj/axonhub:latest
Pod=axonhub.pod
Volume=/path/to/data:/data
Environment=AXONHUB_DB_DIALECT=postgres AXONHUB_DB_DSN=postgres://axonhub:[email protected]:5432/axonhub?sslmode=disable
AutoUpdate=registry
[Service]
Restart=always
[Install]
WantedBy=default.target# axonhub-postgres.container
[Container]
Image=docker.io/library/postgres:16-alpine
Pod=axonhub.pod
Volume=/path/to/db:/var/lib/postgresql/data
Environment=POSTGRES_DB=axonhub POSTGRES_USER=axonhub POSTGRES_PASSWORD=axonhub
AutoUpdate=registry
[Service]
Restart=always
[Install]
WantedBy=default.target/path/to/替换为实际路径。8090替换为你想暴露的端口。
启动
- 保存文件到
~/.config/containers/systemd/ - 运行
systemctl --user daemon-reload - 启动:
systemctl --user start axonhub-pod - 【可选】启用自动更新:
systemctl --user enable --now podman-auto-update.timer