docs(getting-started): add Docker environment variable guide

This commit is contained in:
二丫讲梵 2026-08-06 23:15:34 +08:00 committed by GitHub
parent ab586d121a
commit e452ce26ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

View File

@ -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`

View File

@ -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`: