Files
certificate-system/deploy/production-config.md

99 lines
2.2 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.
# 正式环境配置文档
## 服务器信息
- 服务器IP139.224.165.62
- 操作系统Alibaba Cloud Linux
- 配置2核4G 50G
## 域名和证书
- 域名cert.huiyushuyuan.cn
- SSL证书Let's Encrypt宝塔面板自动申请
- 证书有效期90天自动续期
## 系统配置
### 管理员账号
- 用户名admin
- 密码Admin@2026
### 安全密钥
- SECRET_KEYc79e1bd5d983f4109b4772a1c3078d5d131a0ee3de2227e4c2ffaacf85bbb13e
- CERTIFICATE_NO_SECRET6c82471bcf54e76ec896af91a3f33bde20d42ebe81e792c0128a99088c50445d
### 数据库配置
- 数据库类型MySQL 8.4Docker容器
- 数据库名certificate_system
- 数据库用户certificate
- 数据库密码certificate
- root密码root-password
### 阿里云短信配置
- AccessKey IDLTAI5t7QosqTxVDC9WQr1XKC
- AccessKey SecretbKw8z5jd4dSHd4iw4y1Uek4eqEjTkS
- 短信签名:深圳市慧愈文化科技
- 短信模板CodeSMS_335380348
## 访问地址
- 后台管理https://cert.huiyushuyuan.cn/admin/login
- 公开查询https://cert.huiyushuyuan.cn/query
## 部署目录
- 项目代码:/opt/certificate-system
- 数据目录:/data/certificate-system
- Nginx配置/www/server/panel/vhost/nginx/cert.huiyushuyuan.cn.conf
## 常用命令
```bash
# 进入项目目录
cd /opt/certificate-system
# 查看服务状态
docker compose ps
# 查看日志
docker compose logs -f backend
docker compose logs -f frontend
# 重启服务
docker compose restart
# 停止服务
docker compose down
# 启动服务
docker compose up -d
# 更新代码并重新部署
git pull
docker compose up -d --build
# 进入后端容器
docker compose exec backend bash
# 查看数据库
docker compose exec mysql mysql -ucertificate -pcertificate certificate_system
```
## 备份说明
- 数据库备份:通过后台管理界面「备份管理」功能
- 备份文件位置:/data/certificate-system/db-backups
- 自动清理PDF文件超过5天未访问自动删除
## 注意事项
1. 请妥善保管本文档中的密钥和密码
2. 建议定期更换管理员密码
3. 阿里云AccessKey建议使用RAM用户不要使用主账号
4. Let's Encrypt证书90天自动续期无需手动操作
5. 数据库密码建议修改为更强的密码