hailin
0b8c76f8b5
fix(mining-admin-web): Dockerfile 添加 build ARG 传入后端服务地址
...
next.config.js 的 rewrite 在 next build 时计算, Docker build 阶段
环境变量不可用导致 rewrite 使用 localhost 默认值 (容器内不可达)。
添加 ARG 将服务地址传入 build 阶段:
- NEXT_PUBLIC_API_URL -> mining-admin-service:3023
- TRADING_SERVICE_URL -> trading-service:3022
- MINING_SERVICE_URL -> mining-service:3021
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 01:32:29 -08:00
hailin
394f2529cd
fix(mining-admin-web): ensure public dir exists in Docker build
...
mkdir -p public before build so COPY --from=builder /app/public works
even without static assets.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:03:44 -08:00
hailin
52a5ae64c0
Revert "fix(admin-web): add API_GATEWAY_URL env var for Docker build"
...
This reverts commit 1d7f05b12d .
2026-01-15 21:03:57 -08:00
hailin
1d7f05b12d
fix(admin-web): add API_GATEWAY_URL env var for Docker build
...
The Next.js rewrites in next.config.js require API_GATEWAY_URL to be set
at build time. Added this environment variable to both Dockerfile and
docker-compose.yml to ensure proper routing to Kong gateway in production.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 21:01:27 -08:00
hailin
821c70bf38
feat(docker): 添加 2.0 系统 Docker 部署支持
...
为所有 2.0 服务添加 Dockerfile 和 docker-compose 配置:
后端服务:
- contribution-service (3020) - 算力服务
- mining-service (3021) - 挖矿服务
- trading-service (3022) - 交易服务
- mining-admin-service (3023) - 管理后台 API
- auth-service (3024) - 用户认证服务
前端服务:
- mining-admin-web (3100) - 管理后台前端
Docker 配置:
- docker-compose.2.0.yml: 独立的 2.0 系统编排文件
- 多阶段构建优化镜像大小
- 健康检查确保服务可用性
- 服务依赖顺序正确
部署脚本更新:
- deploy-mining.sh 使用 docker-compose.2.0.yml
- 添加 mining-admin-web 服务别名 (web, admin-web)
- 更新服务端口配置
使用方式:
cd backend/services
docker-compose -f docker-compose.2.0.yml up -d
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 19:31:02 -08:00