This commit is contained in:
eric
2026-05-16 19:24:30 -05:00
parent 19beec12a5
commit 75a0ca4e31
260 changed files with 51345 additions and 1 deletions

View File

@@ -0,0 +1,51 @@
/**
* PM2:在项目根执行 `pm2 start ecosystem.config.cjs` 后 `pm2 save`
* web 使用 scripts/launch.py:若缺少 web-console/out 会自动 npm build 再起 uvicorn
*
* 单频道:通常只启一个 youtube.py(或 tiktok.py)+ web。
* 多频道 Pro:同一项目根下按 PM2 名拆分文件:config/youtube.<name>.ini 与 config/URL_config.<name>.ini(控制台保存时自动创建)。
* PM2 进程名须与控制台线路一致(如 youtube2__ch_xxx),并在 env 中设置 LIVE_PM2_PROCESS_NAME 与同名字符串,供 youtube.py 读取正确 ini。
* 音频处理链与 GitLab 分支 ffmpegAudioRMFoode 中 douyin_youtube_ffplay 对齐;Linux ARM/x86 编码由 config/hardware.env 与硬件探测辅助。
*/
const path = require("path");
const root = __dirname;
const py = process.env.PYTHON || "python3";
module.exports = {
apps: [
{
name: "web",
cwd: root,
script: path.join(root, "scripts", "launch.py"),
interpreter: py,
env: {
HOST: "0.0.0.0",
PORT: process.env.PORT || "8001",
},
},
// —— 单频道直播(Linux ARM/x86 通用,二选一或按需启用)——
// {
// name: "youtube",
// cwd: root,
// script: "youtube.py",
// interpreter: py,
// env: { PYTHONUNBUFFERED: "1" },
// },
// {
// name: "tiktok",
// cwd: root,
// script: "tiktok.py",
// interpreter: py,
// env: { PYTHONUNBUFFERED: "1" },
// },
// —— Pro 第二路示例:与 web 控制台「多频道 Pro」线路 PM2 名一致 ——
// {
// name: "youtube2__lane2",
// cwd: root,
// script: "youtube.py",
// interpreter: py,
// env: { PYTHONUNBUFFERED: "1", LIVE_PM2_PROCESS_NAME: "youtube2__lane2" },
// },
// { name: "obs", cwd: root, script: "bash", args: `-lc ${JSON.stringify(path.join(root, "obs.sh"))}` },
],
};