本地向上

运维部署 社区

技能解读

当前原文的自动摘译,尚未人工审校。

步骤

检查容器是否已经在运行:如果没有任何反应,则在后台启动堆栈:使用--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 分发。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
运维部署
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
Docker
运行环境要求
Docker
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 读取环境变量
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# 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 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。