Files
ai-proj-helper/skills-projects/enjoysa-deploy-plugin/skills/SKILL.md
John Qiu ea266e9cce refactor: 项目技能拆分到 skills-projects/
将 coolbuy (3) 和 enjoysa (2) 共 5 个项目特定技能从 skills/ 移至 skills-projects/,
保持通用技能与业务项目技能分离。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 11:21:53 +10:30

1.9 KiB

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)

快速部署

执行部署脚本:

./scripts/deploy.sh

手动部署步骤

1. 构建

cd web && npm run build

2. 上传

scp -r web/dist/* singapore:/opt/enjoysa/

3. 验证

ssh singapore "curl -s -o /dev/null -w '%{http_code}' http://localhost:6066/"

常用运维命令

# 查看 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

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. 静态资源设置长期缓存