drop require('dotenv') from ecosystem.config.js files (#1230)

TSSBOT has no node_modules/ on the server (no package.json was ever
installed for it), so `require('dotenv').config()` crashes pm2 with
MODULE_NOT_FOUND when it loads the ecosystem file. The dotenv call was
already dead code: every spawned app loads its own .env in its own
process (botscript.py, server.js, web/server.js, webhook updater,
TSSBOT/start_bot.py all do load_dotenv / require('dotenv').config()
themselves). Remove the require from both ecosystem files.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
NotSoToothless
2026-05-14 00:09:51 -07:00
committed by GitHub
parent 3fb15d6282
commit ec08655a59
+5 -4
View File
@@ -1,7 +1,8 @@
// Single source of truth for runtime config is SREBOT/.env (loaded here).
// Do NOT add `env:` blocks to apps below — they would override the .env values
// and create two parallel config sources to reason about.
require('dotenv').config();
// Single source of truth for runtime config is SREBOT/.env. Each spawned
// process loads it independently (botscript.py via python-dotenv, server.js
// and web/server.js via `require('dotenv').config()`, github_webhook_updater.py
// via python-dotenv). Do NOT add `env:` blocks below or load dotenv here —
// either would create a second config source that can silently shadow .env.
const DEPLOY_PATH = __dirname;