Files
docker-playground/README.md
T

28 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🐳 Docker Playground
玩过的 Docker 自部署项目记录。
> 目的:沉淀部署经验、踩坑记录,方便复盘和重新部署。
## 项目总览
| 项目 | 类型 | 状态 | 端口 | 部署日期 |
|------|------|------|------|----------|
| [searxng](searxng.md) | 元搜索引擎 | 🟢 运行中 | 8888 | 2026-07 部署 |
| [paopao-ce](paopao-ce.md) | 微社区平台 | ⚫ 已清理 | - | 2026-08-04 体验后删除 |
| [misskey](misskey.md) | 社交平台 | 🟢 运行中 | 3000 | 2026-08-04 部署 |
## 环境
- VPS:Ubuntu 22.04,3.8G 内存 / 29G 磁盘
- Docker + Docker Compose
- 端口安全策略:业务端口按需暴露,基础设施端口(DB/Redis)只走容器内网
## 通用经验
1. **compose 里的镜像 tag 要验证**:官方 compose 默认 tag 可能不存在(如 paopao-ce 的 `0.6-alpha` 404),改成 `latest` 或查询 Docker Hub 实际 tag
2. **端口冲突先查**:`ss -tlnp` 检查宿主机端口占用,冲突就改映射(`localhost:3307:3306` 之类)
3. **基础设施端口只绑内网**:MySQL/PostgreSQL/Redis 等不要暴露到 「全接口」,用 `internal_network` 或绑定 localhost
4. **官方示例配置常带占位账号**:复制 `example.yml` 后必须把 db 账号密码改成实际值,否则启动报 auth 失败
5. **数据持久化**:挂载到宿主机目录或命名 volume,容器删了数据还在