diff --git a/README.md b/README.md index 6ce4000..c8e77c5 100644 --- a/README.md +++ b/README.md @@ -169,3 +169,24 @@ git log --oneline -n 5 git reset --hard sudo systemctl restart runewager ``` + +### Startup flow (prod-run.sh) + +```mermaid +sequenceDiagram + participant Operator + participant Runner as prod-run.sh + participant System as OS/Filesystem/Systemd + participant NodeApp as node index.js + + Operator->>Runner: Run prod-run.sh + Runner->>System: Validate runtime, dirs, deps, and .env + Runner->>System: Validate logrotate, cron fallback, and systemd config + alt Running under systemd + Runner->>NodeApp: exec node index.js (foreground) + else Running from shell/SSH + Runner->>System: Check existing bot process + Runner->>NodeApp: Launch with nohup in background + end + Runner->>System: Re-check process status after 15s +```