Add pm2 ecosystem config with production TASKS_DIRECTORY#
Problem#
The viewer backend reads TASKS_DIRECTORY from the environment, defaulting to ./tasks. After agent-core centralised artefact storage to /home/agent/AgentSDE/tasks/production, the VPS deployment had no way to pick up the new path automatically.
Task / Link#
Closes #10
Changes#
- Add
ecosystem.config.jsat repo root: pm2 app namedviewerv2-backend,dist/main.jsentry,TASKS_DIRECTORY=/home/agent/AgentSDE/tasks/productioninenv_production - Update
.env.example: add comment documenting the productionTASKS_DIRECTORYvalue
Notes#
- pm2 on VPS must be restarted with
pm2 start ecosystem.config.js --env productionafter deploy for the new config to take effect — operational step outside PR scope.
Testing#
- Config-only change (no TS code); lint and tests have no relevant coverage to run.