Files
lotteryAdmin/ecosystem.config.cjs
kang 330063abf6
Some checks failed
lotteryadmin CI / build (push) Has been cancelled
feat(odds): 支持多开注商赔率快照与配置管理
- 在赔率行数据结构和接口中新增 provider_code 字段支持多开注商
- 管理后台赔率配置页新增开注商筛选,支持查看和编辑指定开注商赔率
- 未指定专属赔率时,自动继承通用(Global)赔率并显示继承标识
- 新增赔率快照展示组件,显示票据下注时锁定的开注商赔率快照
- 优化赔率保存流程,支持基于开注商区分并批量更新赔率数据
- 更新多语言文案,增加开注商与赔率来源标识翻译
- 调整环境配置文档和默认域名为新的开注商域名地址
- 优化界面标签样式,清晰区分通用、专属和继承赔率来源
- Tickets模块新增赔率快照数据类型及详细展示表格
- 修复管理后台及票据详情页部分链接和操作按钮,提升用户体验
2026-07-09 10:51:56 +08:00

48 lines
1.5 KiB
JavaScript
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.
/**
* 管理端lotteryadmin宝塔 PM2 配置
*
* 部署步骤(在服务器项目目录执行):
* 1. 本地 npm run build打包 .next/standalone + .next/static + public 上传服务器
* 2. 服务器:复制 .env.example 为 .env按线上域名填写
* 3. 修改下方 cwd 为服务器上的实际路径(默认即本文件所在目录)
* 4. pm2 start ecosystem.config.cjs
* 5. pm2 save && pm2 startup
*
* 宝塔PM2 管理器 → 添加项目 → 选择本文件。
* Nginx反代到 127.0.0.1:3801 即可;/api 由 Next 转发到 LOTTERY_API_UPSTREAM无需单独配。
*/
const path = require("path");
/** 改成服务器上的绝对路径,例如 /www/wwwroot/lottery-admin.cjdhr.top */
const APP_CWD = path.resolve(__dirname);
module.exports = {
apps: [
{
name: "lotteryadmin",
cwd: APP_CWD,
script: ".next/standalone/server.js",
interpreter: "node",
exec_mode: "fork",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "1G",
time: true,
merge_logs: true,
out_file: path.join(APP_CWD, "logs/pm2-out.log"),
error_file: path.join(APP_CWD, "logs/pm2-error.log"),
env: {
NODE_ENV: "production",
HOSTNAME: "0.0.0.0",
PORT: "3801",
},
// LOTTERY_API_UPSTREAM 只写在 .env勿在此硬编码会覆盖 .env 导致 API 502
env_file: path.join(APP_CWD, ".env"),
},
],
};