mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-15 19:57:07 +08:00
* 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
32 lines
978 B
JavaScript
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: '',
|
|
},
|
|
},
|
|
],
|
|
};
|