Kong网关: - 添加contribution-service-v2 (3020) - 添加mining-service-v2 (3021) - 添加trading-service-v2 (3022) - 添加mining-admin-service (3023) - 添加auth-service-v2 (3024) - 添加mining-wallet-service (3025) Nginx (madmin.szaiai.com): - 添加/api/代理到mining-admin-service:3023 - 支持CORS预检请求 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| README.md | ||
| install.sh | ||
| madmin.szaiai.com.conf | ||
README.md
RWA Mining Admin Web - Nginx 部署指南
域名
- 域名: madmin.szaiai.com
- 端口: 3100
快速部署
1. 启动 Docker 应用
cd frontend/mining-admin-web
./deploy.sh start
2. 配置 DNS
将域名 madmin.szaiai.com 的 A 记录指向服务器 IP。
3. 运行安装脚本
cd nginx
sudo ./install.sh
脚本会自动完成:
- 安装 Nginx
- 安装 Certbot
- 配置防火墙
- 申请 Let's Encrypt SSL 证书
- 配置 HTTPS
手动部署
1. 安装 Nginx 和 Certbot
sudo apt update
sudo apt install -y nginx certbot python3-certbot-nginx
2. 复制 Nginx 配置
sudo cp madmin.szaiai.com.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/madmin.szaiai.com.conf /etc/nginx/sites-enabled/
3. 申请 SSL 证书
sudo mkdir -p /var/www/certbot
sudo certbot certonly --webroot -w /var/www/certbot -d madmin.szaiai.com
4. 启用 HTTPS 配置
sudo nginx -t
sudo systemctl reload nginx
常用命令
# 查看 Nginx 状态
sudo systemctl status nginx
# 重载配置
sudo systemctl reload nginx
# 查看证书
sudo certbot certificates
# 手动续期测试
sudo certbot renew --dry-run
# 查看访问日志
sudo tail -f /var/log/nginx/madmin.szaiai.com.access.log
# 查看错误日志
sudo tail -f /var/log/nginx/madmin.szaiai.com.error.log
证书自动续期
Certbot 安装后会自动配置 systemd timer 进行证书续期:
# 查看续期定时器状态
sudo systemctl status certbot.timer
# 手动测试续期
sudo certbot renew --dry-run
文件说明
| 文件 | 说明 |
|---|---|
madmin.szaiai.com.conf |
Nginx 配置文件 |
install.sh |
一键安装脚本 |
README.md |
本文档 |
架构
Internet
↓
Nginx (443/SSL - Let's Encrypt)
↓
Docker Container (3100/HTTP)
↓
Next.js Application