Files
Mycontent/soul-api/deploy/README.md
Alex-larget 360bba697b refactor: update match configuration and user matching logic
- Changed the daily free match limit to a lifetime limit, aligning with backend configurations.
- Updated the match price display to include original pricing for better user clarity.
- Refactored match quota handling to sync with the server, ensuring accurate match counts and purchase statuses.
- Enhanced UI messages to reflect changes in match availability and pricing.
- Removed deprecated logic related to daily match counts, streamlining the matching process.
2026-04-01 17:09:45 +08:00

57 lines
1.9 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.

# soul-api Docker 部署说明
## 1) 打包运行后必需的文件和目录
### 必需文件
- `soul-api` 可执行文件Docker 镜像内已包含)
- `.env`(或等价环境变量;本方案使用 `deploy/app.env`
- `certs/apiclient_cert.pem`
- `certs/apiclient_key.pem`
### 必需目录
- `uploads/`:上传文件持久化目录
- `log/`:订单同步等日志目录
> 说明:`/app/uploads`、`/app/log` 是容器内目录;本方案已挂载到服务器目录:
> - `/www/wwwroot/self/soul-dev/uploads -> /app/uploads`
> - `/www/wwwroot/self/soul-dev/log -> /app/log`
## 2) 本地/服务器快速启动
`soul-api/deploy` 目录下执行:
1. 复制环境文件:
- `cp app.env.example app.env`
- 按实际环境填写 `DB_DSN`、微信和管理端密钥
2. 启动:
- `docker compose up -d --build`
3. 查看状态:
- `docker compose ps`
- `docker compose logs -f app`
4. 健康检查:
- `http://服务器IP:APP_PORT/health`
## 3) 给宝塔的推荐方式
- 方式 A推荐在宝塔 Docker/Compose 项目里直接使用 `deploy/docker-compose.yml`
- 方式 B`docker build -f deploy/Dockerfile -t soul-api:latest ..`,再在宝塔按镜像创建容器
## 4) 目录结构deploy
- `deploy/Dockerfile`:多阶段构建 Go 应用镜像
- `deploy/docker-compose.yml`:单容器运行与数据卷持久化
- `deploy/app.env.example`:环境变量模板
## 5) 离线镜像部署(不走远端拉取)
你可以把本地导出的 `deploy/soul-api_latest.tar` 上传到服务器,然后:
1. 导入镜像:
- `docker load -i soul-api_latest.tar`
2. 准备配置:
-`deploy/app.env` 放到服务器同目录(或按需改 `env_file`
3. 启动:
- `docker compose up -d --no-build`
> 这种方式不会再从 Docker Hub 拉取 `soul-api` 业务镜像;直接使用你导入的本地镜像运行。