5.3 KiB
Deployment Guide for agents.jeffemmett.com
This guide will help you deploy the Infinite Agents dashboard to your DigitalOcean droplet with automatic GitHub Actions deployments.
🎯 Overview
- Production URL: https://agents.jeffemmett.com
- Droplet IP: 143.198.39.165
- Web Server: Nginx with SSL (Let's Encrypt)
- Auto-Deploy: GitHub Actions on push to
main
📋 Prerequisites
- DigitalOcean droplet at 143.198.39.165
- Domain
agents.jeffemmett.comDNS configured in Cloudflare - SSH access to the droplet
- GitHub repository access
🚀 Initial Setup
Step 1: Configure DNS in Cloudflare
In Cloudflare DNS settings for jeffemmett.com:
Type: A
Name: agents
Content: 143.198.39.165
Proxy status: DNS only (gray cloud)
TTL: Auto
Important: Set to "DNS only" (not proxied) for initial SSL setup.
Step 2: Run Setup Script on Droplet
SSH into your droplet and run the setup script:
# SSH into droplet
ssh root@143.198.39.165
# Clone the repository temporarily to get setup script
git clone https://github.com/Jeff-Emmett/infinite-agents.git /tmp/setup
cd /tmp/setup
# Make script executable and run it
chmod +x deployment/setup-droplet.sh
./deployment/setup-droplet.sh
The script will:
- Install nginx, Node.js, Python
- Clone the repository to
/var/www/agents.jeffemmett.com - Configure nginx with SSL
- Set up automatic SSL renewal
- Deploy the site
Step 3: Configure GitHub Secrets
Add the following secrets to your GitHub repository:
Go to: Repository → Settings → Secrets and variables → Actions → New repository secret
Add these three secrets:
-
DROPLET_HOST
143.198.39.165 -
DROPLET_USER
root -
DROPLET_SSH_KEY
- Your private SSH key for the droplet
- To get it:
cat ~/.ssh/id_rsa(on your local machine) - Copy the entire key including
-----BEGINand-----ENDlines
Step 4: Test Deployment
Push a change to the main branch or trigger the workflow manually:
# Trigger manually via GitHub UI
Go to: Actions → Deploy to DigitalOcean Droplet → Run workflow
# Or push a change
git push origin main
🔧 Manual Deployment (if needed)
If you need to deploy manually:
ssh root@143.198.39.165
cd /var/www/agents.jeffemmett.com
git pull origin main
npm ci
python3 generate_index.py
chown -R www-data:www-data .
systemctl reload nginx
📊 Monitoring & Logs
Check nginx status
systemctl status nginx
View nginx logs
# Access log
tail -f /var/log/nginx/agents.jeffemmett.com-access.log
# Error log
tail -f /var/log/nginx/agents.jeffemmett.com-error.log
Test nginx configuration
nginx -t
🔐 SSL Certificate
SSL certificates are managed by Let's Encrypt and auto-renew.
Check certificate status
certbot certificates
Manual renewal (if needed)
certbot renew
systemctl reload nginx
🔄 Updating the Site
Updates are automatic! Just push to main:
- Make changes locally
- Commit and push to
main - GitHub Actions automatically deploys
- Site updates in ~2 minutes
🐛 Troubleshooting
Site not loading?
- Check DNS propagation:
dig agents.jeffemmett.com - Verify nginx is running:
systemctl status nginx - Check nginx logs for errors
Deployment failing?
- Verify GitHub secrets are set correctly
- Check GitHub Actions logs
- Ensure SSH key has proper permissions
SSL errors?
- Ensure DNS is pointing to droplet IP
- Run:
certbot renew --dry-run - Check certificate:
certbot certificates
📁 Directory Structure
/var/www/agents.jeffemmett.com/
├── .github/workflows/
│ ├── deploy.yml # GitHub Pages deployment
│ └── deploy-droplet.yml # Droplet deployment
├── deployment/
│ ├── nginx-config.conf # Nginx configuration
│ ├── setup-droplet.sh # Initial setup script
│ └── DEPLOYMENT_GUIDE.md # This file
├── index.html # Generated dashboard
├── src/ # UI components
├── threejs_viz/ # Three.js demos
├── sdg_viz/ # SDG visualizations
└── [other demo directories]
🎯 Both Cloudflare Pages AND Droplet?
You can deploy to both!
- Cloudflare Pages: Automatic, global CDN, great for most users
- Droplet: Full control, custom server config, your own infrastructure
Both will deploy automatically on push to main.
🔗 Useful Commands
# SSH into droplet
ssh root@143.198.39.165
# Check deployment
cd /var/www/agents.jeffemmett.com && git status
# View recent commits
cd /var/www/agents.jeffemmett.com && git log -5 --oneline
# Restart nginx
systemctl restart nginx
# Test site locally
curl -I https://agents.jeffemmett.com
✅ Verification Checklist
After setup, verify:
- Site loads at https://agents.jeffemmett.com
- SSL certificate is valid (green lock icon)
- All demo categories display correctly
- GitHub Actions workflow runs successfully
- Push to main triggers auto-deployment
- Site updates after deployment completes
🆘 Support
If you encounter issues:
- Check the troubleshooting section above
- Review GitHub Actions logs
- Check nginx error logs on droplet
- Verify DNS settings in Cloudflare
Happy deploying! 🚀