Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,24 @@ git log --oneline -n 5
git reset --hard <commit_sha>
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
```