From e452ce26ceac4926f17ddc94b167824fa64dfeb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E4=B8=AB=E8=AE=B2=E6=A2=B5?= Date: Thu, 6 Aug 2026 23:15:34 +0800 Subject: [PATCH] docs(getting-started): add Docker environment variable guide --- docs/content/docs/getting-started.cn.mdx | 12 ++++++++++++ docs/content/docs/getting-started.mdx | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/docs/content/docs/getting-started.cn.mdx b/docs/content/docs/getting-started.cn.mdx index 9a6d9c67c..0f32c2b33 100644 --- a/docs/content/docs/getting-started.cn.mdx +++ b/docs/content/docs/getting-started.cn.mdx @@ -94,6 +94,18 @@ description: 安装 DBX、创建第一个连接,并了解桌面版、Docker `latest` 标签会拉取当前发布版本。这里使用跨平台的 `dbx-data` 命名卷;中国大陆用户可改用 `docker.cnb.cool/dbxio.com/dbx:latest`,以获得更快的拉取速度。 + ### 环境变量 + + Docker 镜像支持以下启动参数。使用 `-e 变量名=值` 指定,例如生产环境可添加 `-e DBX_PASSWORD=your-password`: + + | 参数 | 默认值 | 用途 | + | --- | --- | --- | + | `DBX_PASSWORD` | 未设置 | Web 登录密码,生产环境建议设置 | + | `DBX_DISABLE_PASSWORD` | `false` | 设为 `true` 或 `1` 可关闭登录保护 | + | `DBX_DATA_DIR` | `/app/data` | 持久化数据目录 | + | `DBX_PORT` | `4224` | 容器内监听端口 | + | `DBX_PUBLIC_BASE_PATH` | `/` | 子路径部署,例如 `/dbx` | + 启动后访问 `http://localhost:4224`。 `deploy/docker-compose.yml` 用于构建当前源码。若要部署已发布镜像,请使用 `deploy/docker-compose.release.yml`: diff --git a/docs/content/docs/getting-started.mdx b/docs/content/docs/getting-started.mdx index bd74dc4dd..cbc1ab24d 100644 --- a/docs/content/docs/getting-started.mdx +++ b/docs/content/docs/getting-started.mdx @@ -88,6 +88,18 @@ This guide gets you through three things: The `latest` tag pulls the current release. This uses the cross-platform `dbx-data` named volume. For faster pulls in China, use `docker.cnb.cool/dbxio.com/dbx:latest` instead. + ### Environment Variables + + The Docker image supports the following startup variables. Set one with `-e NAME=value`; for example, production deployments should add `-e DBX_PASSWORD=your-password`: + + | Variable | Default | Purpose | + | --- | --- | --- | + | `DBX_PASSWORD` | Not set | Web login password; recommended for production | + | `DBX_DISABLE_PASSWORD` | `false` | Set to `true` or `1` to disable login protection | + | `DBX_DATA_DIR` | `/app/data` | Persistent data directory | + | `DBX_PORT` | `4224` | Container listen port | + | `DBX_PUBLIC_BASE_PATH` | `/` | Deploy below a subpath, such as `/dbx` | + Then open `http://localhost:4224`. `deploy/docker-compose.yml` builds the current checkout. To deploy a published image, use `deploy/docker-compose.release.yml`: