move claude-marketplace to ai-proj-helper
This commit is contained in:
113
plugins/enjoysa-deploy-plugin/skills/SKILL.md
Normal file
113
plugins/enjoysa-deploy-plugin/skills/SKILL.md
Normal file
@@ -0,0 +1,113 @@
|
||||
# EnjoySA 部署技能
|
||||
|
||||
## 触发条件
|
||||
|
||||
当用户提到以下内容时自动激活:
|
||||
- enjoysa 部署
|
||||
- 部署到新加坡
|
||||
- deploy enjoysa
|
||||
|
||||
---
|
||||
|
||||
## 项目信息
|
||||
|
||||
| 项目 | 值 |
|
||||
|------|-----|
|
||||
| 本地路径 | `/Users/donglinlai/coding/qiudl/enjoysa` |
|
||||
| Git 仓库 | `https://gitea.pipexerp.com/qiudl/enjoysa.git` |
|
||||
| 主分支 | main |
|
||||
|
||||
---
|
||||
|
||||
## 服务器信息
|
||||
|
||||
| 项目 | 值 |
|
||||
|------|-----|
|
||||
| 服务器 | singapore (43.134.28.147) |
|
||||
| 用户 | ubuntu |
|
||||
| SSH 密钥 | ~/.ssh/singpore.pem |
|
||||
| 部署路径 | /opt/enjoysa |
|
||||
| 访问地址 | http://43.134.28.147:6066 |
|
||||
| Web 服务 | Nginx (端口 6066) |
|
||||
|
||||
---
|
||||
|
||||
## 快速部署
|
||||
|
||||
执行部署脚本:
|
||||
```bash
|
||||
./scripts/deploy.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 手动部署步骤
|
||||
|
||||
### 1. 构建
|
||||
```bash
|
||||
cd web && npm run build
|
||||
```
|
||||
|
||||
### 2. 上传
|
||||
```bash
|
||||
scp -r web/dist/* singapore:/opt/enjoysa/
|
||||
```
|
||||
|
||||
### 3. 验证
|
||||
```bash
|
||||
ssh singapore "curl -s -o /dev/null -w '%{http_code}' http://localhost:6066/"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 常用运维命令
|
||||
|
||||
```bash
|
||||
# 查看 Nginx 状态
|
||||
ssh singapore "sudo systemctl status nginx"
|
||||
|
||||
# 重载 Nginx 配置
|
||||
ssh singapore "sudo nginx -t && sudo systemctl reload nginx"
|
||||
|
||||
# 查看部署目录
|
||||
ssh singapore "ls -la /opt/enjoysa/"
|
||||
|
||||
# 查看 Nginx 访问日志
|
||||
ssh singapore "sudo tail -f /var/log/nginx/access.log"
|
||||
|
||||
# 查看错误日志
|
||||
ssh singapore "sudo tail -f /var/log/nginx/error.log"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Nginx 配置
|
||||
|
||||
配置文件: `/etc/nginx/sites-available/enjoysa`
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 6066;
|
||||
listen [::]:6066;
|
||||
server_name _;
|
||||
root /opt/enjoysa;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 注意事项
|
||||
|
||||
1. 腾讯云安全组需开放 6066 端口
|
||||
2. SPA 应用使用 `try_files` 支持前端路由
|
||||
3. 静态资源设置长期缓存
|
||||
Reference in New Issue
Block a user