Files
Trading_Studio/ecosystem.config.js
T

27 lines
602 B
JavaScript

/**
* PM2 进程守护配置
* 用法: pm2 start ecosystem.config.js
*/
module.exports = {
apps: [
{
name: "trading_studio",
script: "app.py",
interpreter: "./venv/bin/python",
cwd: __dirname,
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "6G",
env: {
PYTHONUNBUFFERED: "1",
CUDA_VISIBLE_DEVICES: "0",
},
error_file: "./logs/pm2-error.log",
out_file: "./logs/pm2-out.log",
log_date_format: "YYYY-MM-DD HH:mm:ss",
merge_logs: true,
},
],
};