EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
Backend Deployment - Digital Ocean App Platform

Migration Date: February 6, 2026

Overview

Migrated from self-hosted PM2 service on droplet to Digital Ocean App Platform (Sydney region).

Deployment Details

Architecture Changes

Previous Setup:

  • Backend running on droplet via PM2
  • All services co-located on single server

Current Setup:

  • Backend on DO App Platform (serverless)
  • Redis on external droplet (209.38.80.86:6379)
  • AI (llama.cpp) on external droplet (209.38.80.86:11435)
  • PostgreSQL managed database
  • Workers (banking, neto-xero) still on droplet

Environment Variables

Required environment variables configured in DO App Platform:

  • NODE_ENV=production
  • PORT=8080
  • DATABASE_URL (managed PostgreSQL)
  • REDIS_HOST, REDIS_PORT, REDIS_USERNAME, REDIS_PASSWORD
  • LLAMA_CPP_ENDPOINT, LLAMA_CPP_MODEL
  • JWT_SECRET
  • GITHUB_TOKEN (for private repo access to releases)
  • GITHUB_ORG=Independent-Business-Group
  • GITHUB_AGENT_REPO=rmm-psa-agent-v2

MeshCentral Auto-Sync Worker:

  • POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, POSTGRES_PASSWORD (for MeshCentral DB)
  • MESHCENTRAL_URL (e.g., https://rmm-psa-meshcentral-aq48h.ondigitalocean.app)
  • MESHCENTRAL_ADMIN_USER, MESHCENTRAL_ADMIN_PASS (admin credentials)
  • MESHCENTRAL_AUTO_SYNC=true (enables automatic device sync)

Key Changes

  1. Removed Git Update Checker: No longer needed with DO App Platform auto-deploy
  2. CORS Configuration: Added dashboard URL (https://rmm-psa-dashboard-5jyun.ondigitalocean.app)
  3. GitHub Releases Integration:
    • New /api/releases/* endpoints for agent downloads
    • Proxies downloads from GitHub Releases (eliminates DO Spaces need)
  4. External Redis: Configured ACL user doapp with full permissions

Deployment Commands

# Deploy from spec
doctl apps create --spec app-specs/backend-app.yaml
# Update app
doctl apps update fae2d400-6b1d-445f-ac49-7335b8e3b0b3 --spec app-specs/backend-app.yaml
# Check status
doctl apps get fae2d400-6b1d-445f-ac49-7335b8e3b0b3
# View logs
doctl apps logs fae2d400-6b1d-445f-ac49-7335b8e3b0b3 --type run

Health Check

  • Endpoint: /api/health
  • Expected: All services (redis, llama, database) report as healthy

Cost Savings

  • Eliminated DO Spaces: $5-20/month
  • Eliminated build droplet: $12+/month
  • Backend: ~$12/month (Basic plan)

GitHub Repository

Notes

  • Redis ACL configured with dedicated doapp user
  • Database firewall configured to allow App Platform access
  • Health check timeout extended to 60 seconds for AI service initialization