Auto merge dev → main (#1226)

* add tssbot PM2 entry + extend webhook updater to handle TSSBOT

- TSSBOT/ecosystem.config.js: defines just the tssbot app for now.
  Uses system python3 (skeleton has no deps); switch to .venv/bin/python
  once TSSBOT/BOT/botscript.py and a real dependency set exist.
- TSSBOT/start_bot.py: change the stub from exit-immediately to an
  idle loop with SIGTERM/SIGINT handling so PM2 doesn't restart-loop
  the placeholder.
- SREBOT/github_webhook_updater.py: same listener handles the whole
  monorepo. Add a tssbot restart rule that triggers on TSSBOT/BOT/,
  TSSBOT root .py, TSSBOT/start_bot.py, TSSBOT/ecosystem.config.js,
  or SHARED/ changes. A push to SHARED restarts both bots; pushes
  scoped to one bot only restart that bot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* update game files and start tssbot

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
NotSoToothless
2026-05-13 23:49:54 -07:00
committed by GitHub
parent 4d9954934d
commit a7de9ecad2
2 changed files with 55 additions and 6 deletions
+39
View File
@@ -0,0 +1,39 @@
require('dotenv').config();
// __dirname resolves to BOTS/TSSBOT on disk. Override with TSSBOT_DEPLOY_PATH if
// you need to point at a different checkout (e.g. local dev).
const DEPLOY_PATH = process.env.TSSBOT_DEPLOY_PATH || __dirname;
// Default to system python until TSSBOT grows its own dependency set.
// When BOT/botscript.py lands, create TSSBOT/.venv and switch this to
// `${DEPLOY_PATH}/.venv/bin/python`.
const PY_INTERPRETER = process.env.TSSBOT_PY_INTERPRETER || 'python3';
module.exports = {
apps: [
// Discord Bot (skeleton — currently just idles, see TSSBOT/start_bot.py)
{
name: 'tssbot',
script: 'start_bot.py',
interpreter: PY_INTERPRETER,
cwd: DEPLOY_PATH,
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '8000M',
env: {
NODE_ENV: 'production',
PYTHONUNBUFFERED: '1'
},
log_file: './logs/bot_combined.log',
out_file: './logs/bot_out.log',
error_file: './logs/bot_error.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
kill_timeout: 5000,
restart_delay: 3000
}
// tssbot-api and tssbot-web will be added here once the API server and
// web frontend exist under TSSBOT/server.js and TSSBOT/web/server.js.
]
};