Files
qinglong/ecosystem.config.js
T
whyour a94e665054 fix: 修复任务生命周期与调度就绪,优化执行和构建开销 (#3069)
* fix: harden task lifecycle and scheduler readiness

* fix: confine log writes to the configured log directory

* fix: verify complete build artifacts and untracked inputs

* fix: reconcile scheduler state and make stop win startup races

* fix: isolate cron generations and serialize scheduler recovery
2026-09-13 00:32:41 +08:00

32 lines
978 B
JavaScript

const isContainer = process.env.QL_CONTAINER === 'true';
module.exports = {
apps: [
{
name: 'qinglong',
// Keep process supervision; enable injected diagnostics only on demand
// in containers. Standalone installs retain PM2's monitoring default.
pmx: !isContainer || process.env.QL_PRIMARY_APM === 'true',
max_restarts: 5,
kill_timeout: 1000,
wait_ready: true,
listen_timeout: 5000,
source_map_support: true,
time: !isContainer,
out_file: isContainer ? '/dev/null' : undefined,
// Do not persist PM2 logs in containers, but keep early startup errors
// visible through `docker logs` before Winston is initialized.
error_file: isContainer ? '/proc/1/fd/2' : undefined,
script: 'static/build/app.js',
env: {
http_proxy: '',
https_proxy: '',
HTTP_PROXY: '',
HTTPS_PROXY: '',
all_proxy: '',
ALL_PROXY: '',
},
},
],
};