本地向上
- 作者仓库星标 0
- 作者仓库 skills-registry
- 领域
- 运维部署
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tomevault-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- Docker
- 运行环境要求
- Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Start the local dev stack
The local stack is defined in `docker/docker-compose.local.yml`. It already sets `AUTH_MODE=none` and `ALLOW_INSECURE_LOCAL=true` on the backend, so no extra env vars are needed.
## Steps
1. Check whether containers are already running:
```bash
docker compose -f docker/docker-compose.local.yml ps
```
2. If nothing is up, start the stack in the background:
```bash
docker compose -f docker/docker-compose.local.yml up -d --build
```
Use `--build` so code changes since the last run are picked up. Omit it if the user explicitly wants a fast restart without rebuilding.
3. After `up` returns, confirm both services are healthy:
```bash
docker compose -f docker/docker-compose.local.yml ps
```
4. Print the URLs:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Backend docs (FastAPI Swagger): http://localhost:8000/docs
5. If the user wants live logs, tail them:
```bash
docker compose -f docker/docker-compose.local.yml logs -f
```
## Troubleshooting
- **Port 3000 or 8000 already in use**: identify the holder with `lsof -i :3000` / `lsof -i :8000` and ask the user before killing anything.
- **Backend can't write to `/data/db`**: the named volume `dolls_db` is docker-managed — no host path needed. Don't propose bind-mounts unless the user asks.
- **Frontend hot reload not working**: `Dockerfile.dev` runs `vite` with `host: 0.0.0.0`; confirm the container has the source mounted if someone customized the compose file.
- **Auth errors despite `AUTH_MODE=none`**: `ALLOW_INSECURE_LOCAL=true` must also be set — the backend refuses `none` without it. Both are already in `docker-compose.local.yml`; if missing, the file was edited.
## Shutting down
```bash
docker compose -f docker/docker-compose.local.yml down
```
Add `-v` only if the user explicitly wants to wipe the SQLite DB and uploaded photos.
---
> Source: [bronweg/doll-inventory](https://github.com/bronweg/doll-inventory) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->
章节与文件索引
按说明文件中的顺序排列。
步骤
故障排除
正在关闭
文件/命令 -> docker/docker-compose.local.yml · AUTH_MODE=none · ALLOW_INSECURE_LOCAL=true · --build · lsof -i :3000 · lsof -i :8000 · /data/db · dolls_db
内容校验值 -> 21663a9d0051
当前原文的自动摘译,尚未人工审校。
步骤
检查容器是否已经在运行:如果没有任何反应,则在后台启动堆栈:使用
--build,以便拾取自上次运行以来的代码更改。如果用户明确希望快速重新启动而不重建,请忽略它。up返回后,确认两个服务均正常:打印 URL:故障排除
端口 3000 或 8000 已在使用:用
lsof -i :3000/lsof -i :8000识别持有者,并在杀死任何东西之前询问用户。后端无法写入/data/db:命名卷dolls_db是 docker 管理的 — 不需要主机路径。除非用户要求,否则不要建议绑定安装。前端热重载不起作用:Dockerfile.dev与host: 0.0.0.0一起运行vite;如果有人自定义了撰写文件,请确认容器已安装源。正在关闭
仅当用户明确想要擦除 SQLite DB 和上传的照片时才添加
-v。资料来源:bronweg/doll-inventory — 由 TomeVault 分发。