Files
firefrost-services/services/arbiter-3.0/DEPLOYMENT.md
Claude 91eea2c5ff Add Arbiter deployment script and documentation
Created:
- deploy.sh: One-command deployment script
- DEPLOYMENT.md: Full deployment guide

Features:
- Handles cleanup of old temp directories
- Shallow clone for speed
- Checks for dependency changes
- Verifies service after restart
- Clear error messages

Usage on Command Center:
  bash /opt/arbiter-3.0/deploy.sh

Or remote curl:
  curl -fsSL https://git.firefrostgaming.com/.../deploy.sh | bash

Chronicler #69
2026-04-08 08:22:22 +00:00

115 lines
2.5 KiB
Markdown

# Arbiter 3.0 Deployment Guide
**Location:** Command Center (63.143.34.217)
**Service:** `arbiter-3` (systemd)
**Directory:** `/opt/arbiter-3.0`
**Dashboard:** https://discord-bot.firefrostgaming.com/admin
---
## ⚠️ IMPORTANT: Arbiter is NOT a Git Repo
`/opt/arbiter-3.0` on Command Center is **not** a git repository. It's a deployment target.
**Source of truth:** `firefrost-services` repo → `services/arbiter-3.0/`
**Why?** Production servers shouldn't have git credentials or .git history. Deploy by copying files.
---
## Quick Deploy (One Command)
**On Command Center:**
```bash
curl -fsSL https://git.firefrostgaming.com/firefrost-gaming/firefrost-services/raw/branch/main/services/arbiter-3.0/deploy.sh | bash
```
**Or if deploy.sh is already on server:**
```bash
bash /opt/arbiter-3.0/deploy.sh
```
---
## Manual Deploy
```bash
# On Command Center
cd /tmp
rm -rf firefrost-services
git clone https://git.firefrostgaming.com/firefrost-gaming/firefrost-services.git
cp -r firefrost-services/services/arbiter-3.0/src/* /opt/arbiter-3.0/src/
systemctl restart arbiter-3
rm -rf firefrost-services
```
---
## Verify Deployment
```bash
# Check service status
systemctl status arbiter-3
# Check logs
journalctl -u arbiter-3 -n 50
# Test dashboard
curl -s https://discord-bot.firefrostgaming.com/admin | head -5
```
---
## Common Issues
### "fatal: not a git repository"
**Cause:** Someone tried to `git pull` in `/opt/arbiter-3.0`
**Fix:** Use the deploy script or manual copy method above
### "/tmp/firefrost-services already exists"
**Cause:** Previous deploy didn't clean up
**Fix:** `rm -rf /tmp/firefrost-services` then try again
### Service fails to start
**Check:** `journalctl -u arbiter-3 -n 50`
**Common causes:**
- Missing .env file
- Database connection failed
- Port already in use
- Syntax error in code
---
## Environment Variables
Required in `/opt/arbiter-3.0/.env`:
```
DATABASE_URL=postgresql://...
DISCORD_TOKEN=...
DISCORD_CLIENT_ID=...
DISCORD_CLIENT_SECRET=...
PANEL_URL=https://panel.firefrostgaming.com
PANEL_APPLICATION_KEY=...
PANEL_CLIENT_KEY=...
STRIPE_SECRET_KEY=...
STRIPE_WEBHOOK_SECRET=...
SESSION_SECRET=...
MINECRAFT_NEST_IDS=1,5
```
---
## For Chroniclers
**You cannot SSH to Command Center** (port 22 blocked from Claude sandbox).
**Workflow:**
1. Make changes to `firefrost-services/services/arbiter-3.0/`
2. Commit and push to Gitea
3. Tell Michael to run: `bash /opt/arbiter-3.0/deploy.sh`
4. Verify via dashboard or ask Michael to check logs
---
**Fire + Frost + Foundation = Where Love Builds Legacy** 🔥❄️