Files
soul-yongping/soul-api/deploy/README.md
Alex-larget 6df1736e1e 1
2026-03-20 14:47:37 +08:00

34 lines
986 B
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.

# soul-api Docker 部署
Docker 相关配置均在此目录,根目录仅保留 `deploy.py`
## 文件说明
| 文件 | 用途 |
|------|------|
| `Dockerfile` | 多阶段构建golang + alpine需拉取 golang 镜像 |
| `Dockerfile.local` | 仅运行阶段,配合 `deploy.py --local-go` 使用本地 Go 编译 |
| `docker-compose.bluegreen.yml` | 蓝绿部署8081/8082含 Redis 7-alpine |
| `docker-compose.production.yml` | 生产单实例部署 |
| `docker-compose.yml` | 本地开发 Redis |
| `docker-deploy-remote.sh` | 服务器端蓝绿切换脚本 |
## 镜像版本
- **soul-api**Go 1.25alpine 3.19
- **Redis**7-alpine与 soul-api 一并打包上传,服务器无需拉取)
- **MySQL**:外部服务,不打包
## 用法
```bash
# 一键部署(蓝绿)
python deploy.py --mode docker
# 使用本地 Go 编译
python deploy.py --mode docker --local-go
# 本地启动 Redis
docker compose -f deploy/docker-compose.yml up -d
```