Full server infrastructure survey

Complete audit of dev server: all domains, ports, services, databases,
cron jobs, web roots, Lucee webapps, nginx routing, SSL certs, disk/RAM,
WireGuard VPN, docker, and migration status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-03-17 15:33:13 -07:00
parent db69fd619f
commit e31cb5cbdf

View file

@ -1,72 +1,122 @@
# Payfrit Infrastructure — Server Map # Payfrit Infrastructure — Full Server Survey
*Last updated: 2026-03-17 by @raj*
## Dev Server (dev.payfrit.com) ## Dev Server (dev.payfrit.com)
- **IP:** Behind WireGuard VPN (10.10.0.x) - **Provider:** VPS (232GB disk, 7.7GB RAM)
- **SSH:** ssh dev.payfrit.com (user: john, key-based auth, port 38291)
- **OS:** Ubuntu - **OS:** Ubuntu
- **Web:** nginx + PHP 8.3-FPM + Lucee/Tomcat (being migrated off) - **SSH:** ssh dev.payfrit.com (user: john, key-based auth, port 38291)
- **VPN:** WireGuard (wg0) — 10.10.0.0/24, peer at 74.208.234.8:51820
- **Disk:** 13GB used / 232GB total (6%)
- **RAM:** 1.5GB used / 7.7GB total
- **Uptime:** stable (3+ days as of survey)
### Sites on Dev Server ### Domains & Routing (nginx)
| Domain | Path | Stack | Notes | | Domain | Backend | Root/Proxy | SSL | Notes |
|--------|------|-------|-------| |--------|---------|-----------|-----|-------|
| dev.payfrit.com | /var/www/payfrit-api/ | PHP 8.3 | Main Payfrit API | | dev.payfrit.com | PHP-FPM + Lucee | /var/www/payfrit-api/ (PHP), proxy 8888 (CFML fallback) | Let's Encrypt | PHP for /api/, /cron/, /food/; Lucee for everything else |
| dev.payfrit.com/food/ | /var/www/payfrit-food/ | PHP 8.3 | Payfrit Food (API + portals) | | dev.payfrit.com/food/ | PHP-FPM | /var/www/payfrit-food/ | (same cert) | Payfrit Food project |
| god.payfrit.com | /opt/lucee/tomcat/webapps/ROOT/god.payfrit.com/ | Lucee CFML (VPN-only) | Admin/god mode dashboard | | god.payfrit.com | Lucee + PHP-FPM | /opt/lucee/.../god.payfrit.com/ | Let's Encrypt | VPN-only (10.10.0.0/24). PHP for .php files, Lucee for rest |
| git.payfrit.com | Forgejo (port 3000) | Go | Code hosting (Forgejo) | | git.payfrit.com | Forgejo | proxy localhost:3000 | Let's Encrypt | Forgejo git hosting |
| mm.payfrit.com | Mattermost | Go | Team chat | | code.payfrit.com | code-server | proxy localhost:8080 | Let's Encrypt | Web VS Code (not used for bots) |
| llm.payfrit.com | DELETED (2026-03-17) | — | Was a test LLM tool | | status.payfrit.com | Uptime Kuma | proxy localhost:3001 | Let's Encrypt | Monitoring dashboard |
| mm.payfrit.com | Mattermost | (separate server or config) | — | Team chat |
| llm.payfrit.com | **DELETED** | — | Cert still exists | Removed 2026-03-17 |
### Services on Dev Server ### Listening Ports
| Service | Status | Notes | | Port | Service | Notes |
|---------|--------|-------| |------|---------|-------|
| nginx | active | Reverse proxy for all sites | | 80 | nginx | HTTP (redirects to 443) |
| php8.3-fpm | active | PHP processing | | 443 | nginx | HTTPS for all domains |
| Lucee/Tomcat (port 8888) | active (being phased out) | Only god mode left after CFM migration | | 38291 | sshd | SSH access |
| forgejo | active | Git hosting at git.payfrit.com | | 3000 | Forgejo | Git hosting |
| payfrit-bot-poller | active | Polls MM for bot messages, responds via Claude API | | 3001 | Uptime Kuma (node) | Status monitoring |
| payfrit-bot-worker | active | Picks BotTasks from DB, runs Claude Code CLI | | 8080 | code-server (node) | Web VS Code |
| 8888 | Lucee/Tomcat (java) | CFML engine — being phased out |
| 8005 | Tomcat shutdown | Internal only |
| 8009 | Tomcat AJP | Internal only |
### Databases (10.10.0.1) ### Services
| Service | Status | Purpose |
|---------|--------|---------|
| nginx | running | Reverse proxy for all sites |
| php8.3-fpm | running | PHP processing |
| lucee_ctl (Tomcat) | running | CFML engine — only god mode + legacy endpoints |
| forgejo | running | Git hosting (git.payfrit.com) |
| code-server@john | running | Web VS Code (code.payfrit.com) — not used for bots |
| uptime-kuma | running | Monitoring (status.payfrit.com) |
| payfrit-bot-poller | running | Polls MM for bot messages, responds via Claude API |
| payfrit-bot-worker | running | Picks BotTasks from DB, runs Claude Code CLI |
| docker | running | Container runtime (no containers currently active) |
| fail2ban | running | SSH brute-force protection |
| WireGuard (wg0) | running | VPN tunnel to prod/office |
### Web Roots
| Path | Contents |
|------|----------|
| /var/www/payfrit-api/ | Main Payfrit PHP API |
| /var/www/payfrit-food/ | Payfrit Food (PHP API + portals + bot scripts) |
| /var/www/bots/ | Central bot memory repo |
| /var/www/dev.payfrit.com/ | (may be unused — check) |
| /var/www/html/ | Default nginx root |
| /opt/lucee/tomcat/webapps/ROOT/ | Lucee webapps (main CFML app, god, legacy) |
### Lucee Webapps (in /opt/lucee/tomcat/webapps/ROOT/)
Main CFML ordering platform directories: admin, api, cfpayment, config, cron, css, downloads, fonts, hud, images, includes, js, kds, library, migrations, modules, php-api, playwright, portal, qa, receipt, styles, temp, twilio, uploads, verticals, _webhook
Sub-sites: god.payfrit.com/ (admin panel)
### Cron Jobs (john's crontab)
| Schedule | Command | Purpose |
|----------|---------|---------|
| * * * * * | /home/john/check-deploy.sh | Auto-deploy on git push (main site) |
| * * * * * | /home/john/check-deploy-api.sh | Auto-deploy on git push (API) |
| */5 * * * * | curl .../cron/expireTabs.php | Expire stale tabs every 5 min |
| * * * * * | curl .../cron/expireStaleChats.php | Expire stale chats every 1 min |
### Databases (MySQL at 10.10.0.1)
| Database | Purpose | | Database | Purpose |
|----------|---------| |----------|---------|
| payfrit | Main Payfrit (prod) | | payfrit | Main Payfrit (prod) — ordering, businesses, users, menus |
| payfrit_dev | Main Payfrit (dev) | | payfrit_dev | Main Payfrit (dev/staging) |
| payfrit_food | Payfrit Food project | | payfrit_food | Payfrit Food — products, sponsors, health scores, bot tasks |
- **User:** payfrit_app / Bv9#hLs4Wq@zK8nR | gvoice | Google Voice (purpose unclear — may be legacy) |
- **Access:** Via VPN or from dev server localhost - **Credentials:** payfrit_app / Bv9#hLs4Wq@zK8nR
- **Access:** Via WireGuard VPN or from dev server localhost
## Prod Server (biz.payfrit.com) ## Prod Server (biz.payfrit.com)
- **IP:** 74.208.234.8 (WireGuard peer)
- **Purpose:** Production Payfrit ordering platform - **Purpose:** Production Payfrit ordering platform
- **Stack:** Lucee/CFML + nginx - **Stack:** Lucee/CFML + nginx (assumed same as dev pattern)
- **Deploys:** scp files then ssh to copy into place - **Deploys:** scp files to dev, then copy into place
### Sites on Prod Server ### Sites on Prod
| Domain | Purpose | | Domain | Purpose |
|--------|---------| |--------|---------|
| biz.payfrit.com | Payfrit ordering platform (businesses, menus, ordering) | | biz.payfrit.com | Payfrit ordering platform (businesses, menus, KDS, HUD) |
| food.payfrit.com | Payfrit Food marketing site (WordPress) | | food.payfrit.com | Payfrit Food marketing site (WordPress) |
## Git Repos (git.payfrit.com/payfrit/) ## Git Repos (git.payfrit.com/payfrit/)
| Repo | Purpose | Local Path | | Repo | Purpose | Local Path | Server Path |
|------|---------|------------| |------|---------|------------|-------------|
| payfrit-food | Food project (PHP API + portals + bot scripts) | C:\dev\payfrit-food\ | | payfrit-food | Food: PHP API + portals + bot scripts | C:\dev\payfrit-food\ | /var/www/payfrit-food/ |
| payfrit-api | Main Payfrit PHP API | C:\dev\payfrit-api\ | | payfrit-api | Main PHP API | C:\dev\payfrit-api\ | /var/www/payfrit-api/ |
| payfrit-biz | Biz portal frontend | C:\dev\payfrit-biz\ | | payfrit-biz | Biz portal frontend | C:\dev\payfrit-biz\ | — |
| bots | Central bot memory + infrastructure | C:\dev\bots\ | | bots | Bot memory + infra docs | C:\dev\bots\ | /var/www/bots/ |
| payfrit-user-android | Android customer app (Kotlin) | C:\dev\payfrit-android\ | | payfrit-user-android | Android customer app (Kotlin) | C:\dev\payfrit-android\ | — |
| payfrit-works-android | Android worker app (Kotlin) | C:\dev\payfrit-works-android\ | | payfrit-works-android | Android worker app (Kotlin) | C:\dev\payfrit-works-android\ | — |
| payfrit-beacon-android | Android beacon tool (Kotlin) | C:\dev\payfrit-beacon-android\ | | payfrit-beacon-android | Android beacon tool (Kotlin) | C:\dev\payfrit-beacon-android\ | — |
| payfrit-food-ios | iOS food scanner | — (Mac) | | payfrit-food-ios | iOS food scanner (Swift) | — (Mac) | — |
| payfrit-user-ios | iOS customer app (Swift) | — (Mac) | | payfrit-user-ios | iOS customer app (Swift) | — (Mac) | — |
| payfrit-works-ios | iOS worker app (Swift) | — (Mac) | | payfrit-works-ios | iOS worker app (Swift) | — (Mac) | — |
| payfrit-beacon-ios | iOS beacon tool (Swift) | — (Mac) | | payfrit-beacon-ios | iOS beacon tool (Swift) | — (Mac) | — |
| payfrit-brand | Brand assets | C:\dev\payfrit-brand\ | | payfrit-brand | Brand assets | C:\dev\payfrit-brand\ | — |
| payfrit-theme | Main WP theme | C:\dev\payfrit-theme\ | | payfrit-theme | Main WP theme | C:\dev\payfrit-theme\ | — |
| payfrit-pads-theme | Pads WP theme | C:\dev\payfrit-pads-theme\ | | payfrit-pads-theme | Pads WP theme | C:\dev\payfrit-pads-theme\ | — |
| payfrit-god | God mode (admin panel) | — (on server) | | payfrit-god | God mode admin panel | — | /opt/lucee/.../god.payfrit.com/ |
| payfrit-help | Help desk | — | | payfrit-help | Help desk | — | — |
| payfrit-wp | WordPress config | — | | payfrit-wp | WordPress config | — | — |
| payfrit-work | Work/tasks module | — | | payfrit-work | Work/tasks module | — | — |
| addmonths/app | Add Months Flutter app | C:\dev\add_months\ | — |
## Deploy Commands ## Deploy Commands
```bash ```bash
@ -86,16 +136,21 @@ git push origin main && ssh dev.payfrit.com "sudo git -C /var/www/bots pull orig
## Key URLs ## Key URLs
| URL | Purpose | | URL | Purpose |
|-----|---------| |-----|---------|
| https://dev.payfrit.com | Dev main site | | https://dev.payfrit.com | Dev main site (CFML + PHP) |
| https://dev.payfrit.com/food/ | Dev food portal | | https://dev.payfrit.com/food/ | Dev food portal (PHP) |
| https://biz.payfrit.com | Prod ordering | | https://biz.payfrit.com | Prod ordering platform |
| https://food.payfrit.com | Food marketing (WP) | | https://food.payfrit.com | Food marketing (WordPress) |
| https://god.payfrit.com | Admin dashboard (VPN-only) | | https://god.payfrit.com | Admin dashboard (VPN-only) |
| https://git.payfrit.com | Forgejo git hosting | | https://git.payfrit.com | Forgejo git hosting |
| https://mm.payfrit.com | Mattermost team chat | | https://mm.payfrit.com | Mattermost team chat |
| https://code.payfrit.com | Web VS Code (not actively used) |
| https://status.payfrit.com | Uptime Kuma monitoring |
## Migration Status (2026-03-17) ## Migration Status (2026-03-17)
- llm.payfrit.com: DELETED - [x] llm.payfrit.com: DELETED
- 6 CFM API endpoints: being migrated to PHP by @mike - [x] nginx duplicate configs cleaned up (dev.payfrit.com.bak, god.payfrit.com.bak)
- god.payfrit.com: staying on Lucee for now (VPN-only, low priority) - [ ] 6 CFM API endpoints: being migrated to PHP by @mike (almost done)
- Goal: shut down Lucee once CFM endpoints are migrated - [ ] god.payfrit.com: staying on Lucee for now (VPN-only, ~30 CFM endpoints)
- [ ] code-server: still running but not used for bots — could be disabled to save resources
- [ ] gvoice database: purpose unclear — may be legacy, investigate
- **Goal:** shut down Lucee once all CFM endpoints are migrated