This is an automated email from the ASF dual-hosted git repository.
hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-gateway.git
The following commit(s) were added to refs/heads/master by this push:
new 84694bc docs: say what Gateway can and cannot do in a container
84694bc is described below
commit 84694bc28836d174e81458e823569816c70b2b5d
Author: Yang Luo <[email protected]>
AuthorDate: Fri Aug 21 17:29:57 2026 +0800
docs: say what Gateway can and cannot do in a container
---
README.md | 29 +++++++++++++++++++++++++++++
README_zh.md | 29 +++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/README.md b/README.md
index a2b0354..5af2da2 100644
--- a/README.md
+++ b/README.md
@@ -96,6 +96,35 @@ Set `INSTALL_DIR` to install somewhere else, or `NO_START=1`
to install without
**These are nightly builds**, rebuilt from `master` on every push and
published as the
[`nightly`](https://github.com/apache/casbin-gateway/releases/tag/nightly)
pre-release. They exist so that Gateway can be tried without a Go and Node
toolchain; anything else should be built from a source release.
+### Running in Docker or Podman
+
+**A container cannot see the agents on your machine.** Agents are discovered
by reading the home directories and install paths of the machine Gateway runs
on, and inside a container that is the container's own filesystem. **Agents**,
**Skills & MCP** and agent monitoring therefore stay empty there, and the pages
say so rather than pretending nothing is installed. Everything that does not
depend on the host works normally: **Channels**, **LLM Records** and the
reverse-proxy WAF.
+
+So run the one-command install above on the machine whose agents you want to
watch, and use a container when Gateway is only a model endpoint or a reverse
proxy for other machines.
+
+No image is published, so the compose file builds one from a checkout of this
repository:
+
+```bash
+docker compose up -d
+```
+
+Podman reads the same file:
+
+```bash
+podman compose up -d
+```
+
+Either way the UI is on http://localhost:17000, the SQLite database lives in a
named volume that survives `down`, and `conf/app.conf` is mounted from the
repository, so settings can be changed and the container restarted without
rebuilding it.
+
+To serve the WAF proxy from a container, set `gatewayEnabled = true` in that
mounted `conf/app.conf` and publish its ports too, by adding them next to
`17000:17000` in `docker-compose.yml`:
+
+```yaml
+ ports:
+ - "17000:17000"
+ - "8080:80"
+ - "8443:443"
+```
+
## Configuration
Everything is optional. Settings live in `conf/app.conf`, next to the
executable, and each one is explained in the file itself. The ones people
actually change:
diff --git a/README_zh.md b/README_zh.md
index cb312d1..0020088 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -96,6 +96,35 @@ export ANTHROPIC_AUTH_TOKEN="casbin-gateway"
**这些是 nightly 构建**,每次推送都从 `master` 重新构建,并作为
[`nightly`](https://github.com/apache/casbin-gateway/releases/tag/nightly)
预发布版本发布。它们的用途是让人不装 Go 和 Node 工具链就能试用 Gateway;其他场景都应该从源码发布版构建。
+### 在 Docker 或 Podman 里运行
+
+**容器看不到你机器上的 Agent。** Agent 是靠读取 Gateway
所在机器的用户主目录和安装路径发现的,而在容器里那是容器自己的文件系统。所以 **Agents**、**Skills & MCP** 和 Agent
监控在容器里一直是空的,页面会直接说明这一点,而不是让人以为什么都没装。不依赖宿主机的部分照常可用:**Channels**、**LLM Records**
和 WAF 反向代理。
+
+因此,想监控哪台机器上的 Agent,就在那台机器上跑上面的一键安装;只把 Gateway 当作模型入口或别的机器的反向代理时,才用容器部署。
+
+我们没有发布镜像,compose 文件会用本仓库的源码构建一个,所以先把仓库 clone 下来,在仓库根目录执行:
+
+```bash
+docker compose up -d
+```
+
+Podman 读同一个文件:
+
+```bash
+podman compose up -d
+```
+
+两种方式下管理界面都在 http://localhost:17000,SQLite 数据库存在一个命名卷里,`down`
之后依然保留;`conf/app.conf` 从仓库挂载进去,改完配置重启容器即可生效,不用重新构建镜像。
+
+想在容器里用 WAF 反向代理,把挂载的 `conf/app.conf` 里的 `gatewayEnabled` 设为 `true`,并在
`docker-compose.yml` 里 `17000:17000` 旁边补上它的端口:
+
+```yaml
+ ports:
+ - "17000:17000"
+ - "8080:80"
+ - "8443:443"
+```
+
## 配置
所有配置都是可选的。设置位于可执行文件旁边的 `conf/app.conf`,每一项在文件里都有说明。真正常被改动的是这些:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]