Files
2026-08-09 19:46:36 +05:30

58 lines
2.5 KiB
Markdown
Executable File

# radius-cli 🚀
A lightweight, pull-based, Git-driven Continuous Deployment (CD) agent written in pure Bash.
**radius-cli** is designed for developers hosting web applications on VPS or shared hosting environments where traditional heavy CI/CD runners (like GitHub Actions, GitLab Runners, or Jenkins) cannot run due to memory limitations or network environment constraints (e.g., SSHFS network mounts, Cygwin, or firewalled networks).
## ✨ Key Features
- **Zero Memory Footprint:** Runs instantly via standard Cron intervals. Consumes 0MB of background RAM.
- **Fail-Safe Extraction Guard:** Checks code health before modifying the production web directory to protect your site from network corruption.
- **Smart Directory Mirroring:** Uses optimized `rsync --delete` loops with complete custom exclusions.
- **Granular Daily Operations Logging:** Automatically maintains organized logs in `DDMMYYYY.log` formatting.
- **Integrated Environment Management:** Automatically handles server file permissions (`chmod`/`chown`) and post-deployment optimization steps (`composer install -o`).
## 🛠️ Installation & Setup
### 1. Clone the repository structure into your project `bin/` directory:
```bash
mkdir -p bin && cd bin
wget https://git.codelxior.com/jaspreet/radius-cli/archive/main.zip
chmod +x radius-cli
```
### 2. Configure Your Environment Variables:
Copy the example config file and fill in your Gitea token credentials:
```bash
cd radius-cli
nano config/main
```
### 3. Create your Deployment Excludes File (`exclude.rsync.conf`):
List all runtime variable configurations and user file upload directories that SyncForge must never modify or overwrite:
```text
.env
uploads/
assets/images/dealers/
logs/
syncforge.conf
```
## 🚀 Usage Guide
SyncForge runs as an expressive, command-driven CLI tool layout:
- **List All Remote Branches:** `./bin/radius list-branch`
- **List System Milestone Releases:** `./bin/radius list-release`
- **Trigger Production Deployment Manually:** `./bin/radius update`
- **Background Cron-Quiet Pipeline Execution:** `./bin/radius update --quiet`
### Automating with Crontab
To run your web sync operations automatically every night at 2:30 AM, append this single statement to your server's crontab config (`crontab -e`):
```text
30 2 * * * /home/username/public_html/bin/radius update --quiet
```
## 📄 License
This utility is open-source software licensed under the [MIT License](LICENSE).