/** * PM2 进程配置 * 使用 Python 虚拟环境中的 http.server 提供静态文件服务 */ module.exports = { apps: [ { name: "chart-label-tool", cwd: "/opt/chart-label-tool", script: "/opt/chart-label-tool/venv/bin/python", args: "-m http.server 8010 --bind 0.0.0.0 --directory /opt/chart-label-tool/public", interpreter: "none", autorestart: true, watch: false, max_memory_restart: "128M", env: { PYTHONUNBUFFERED: "1", }, }, ], };