feature: Update forge script for alerting and backup testing, add docs for other toolchain scripts

This commit is contained in:
Keith Solomon
2025-12-05 09:57:10 -06:00
parent 5e993d9dd9
commit 97572196f9
5 changed files with 104 additions and 15 deletions

View File

@@ -215,9 +215,11 @@ If the runner needs re-registration, follow section 4.3.
---
## 10. `forge` CLI Tool
## 10. CLI Toolkit
A custom CLI tool [`forge`](/assets/files/gitea/forge) exists to help manage common tasks:
### [`forge`](/assets/files/gitea/forge.sh) Tool
A custom CLI tool to help manage common tasks:
| Command | Description |
| --------------------------- | ---------------------------------------------------------- |
@@ -226,11 +228,24 @@ A custom CLI tool [`forge`](/assets/files/gitea/forge) exists to help manage com
| `forge gitea-logs` | Tail logs from Gitea container |
| `forge runner-logs` | Tail logs from Actions runner container |
| `forge backup` | Run a Gitea dump and move it into BACKUP_DIR |
| `forge restore-test` | Run backup restore sanity checks (unzip + extract) |
| `forge restart-gitea` | Restart Gitea stack |
| `forge restart-runner` | Restart Actions runner stack |
| `forge runner-reset` | Re-register runner with current labels (destroys .runner) |
| `forge diag` | Quick diagnostic summary |
### [`forge-alert`](/assets/files/gitea/forge-alert.sh) Tool
A companion script that serves as a basic reusable alert sender, capable of logging to syslog and sending notifications via Telegram. Telegram bot token and chat ID must be set in environment variables by editing `/etc/environment` in a root/`sudo` shell.
### [`forge-b2-backup`](/assets/files/gitea/forge-b2-backup.sh) Tool
A backup script that uploads Gitea dumps to Backblaze B2 cloud storage. Utilizes `rclone`, so make sure to configure an appropriate remote (`B2` by default)before use. Alerts via `forge-alert.sh` for backup status.
### [`forge-restore-test`](/assets/files/gitea/forge-restore-test.sh) Tool
A restore test script that performs basic integrity checks on the latest Gitea dump file, including unzip testing and extraction smoke test. Alerts via `forge-alert.sh` if any issues are detected.
---
## TL;DR Cheat Sheet