# 小程序后台 — 部署配置参考 > 摘录自 `D:\003_Project\004_Git\REPOS.md`,仅保留公共部分 + miniapp-api 相关内容。 ## 服务器 | 项 | 值 | |----|-----| | IP | `8.136.137.59` | | SSH 密钥 | `D:\003_Project\小程序连接.pem` | | SSH 连接 | `ssh -i "D:\003_Project\小程序连接.pem" root@8.136.137.59` | ## Gitea | 项 | 值 | |----|-----| | 网址 | `https://git.dxz99wyr.cn` | | 用户名 | `Superuser` | | 密码 | `Admin@123` | | SSH Git 端口 | `2222` | | SSH Git 地址格式 | `ssh://git@8.136.137.59:2222/Superuser/<仓库名>.git` | | HTTP Git 地址格式 | `https://git.dxz99wyr.cn/Superuser/<仓库名>.git` | ## miniapp-api(小程序后台) | 项 | 值 | |----|-----| | Git 地址 (SSH) | `ssh://git@8.136.137.59:2222/Superuser/miniapp-api.git` | | Git 地址 (HTTPS) | `https://git.dxz99wyr.cn/Superuser/miniapp-api.git` | | 本地路径 | `D:\003_Project\WeixinProject\QuanYiXiaoZhuShou\backend` | | 服务器路径 | `/opt/ALiYunManager/services/miniapp-api` | | Docker 服务名 | `miniapp-api` | | 容器名 | `miniapp-api` | | 部署方式 | `git pull` → `docker compose -f /opt/ALiYunManager/docker-compose.yml up -d --no-deps --force-recreate miniapp-api` | | Webhook Secret | `miniapp-api-deploy-secret` | ## 日常开发流程 ```bash git add . git commit -m "feat: 描述你的改动" git push # ↑ push 后自动触发 Webhook → 服务器拉代码 → 重启容器,无需手动部署 ``` ## 服务器常用命令 ```bash # 查看所有容器 ssh -i "D:\003_Project\小程序连接.pem" root@8.136.137.59 "docker ps" # 查看部署日志 ssh -i "D:\003_Project\小程序连接.pem" root@8.136.137.59 "tail -f /home/Git/logs/deploy.log" # 重启 miniapp-api ssh -i "D:\003_Project\小程序连接.pem" root@8.136.137.59 "cd /opt/ALiYunManager && docker compose up -d --no-deps --force-recreate miniapp-api" # 重载 main-nginx ssh -i "D:\003_Project\小程序连接.pem" root@8.136.137.59 "docker exec main-nginx nginx -t && docker exec main-nginx nginx -s reload" ```