Skip to content

Architecture Overview


Full Pipeline

Developer (localhost)
    │
    │  git push origin staging
    ▼
GitHub Repository
    │
    ▼
GitHub Actions Pipeline
    ├─► SonarQube (43.205.140.176)
    │       PHP code quality scan
    │       FAIL → Stop + notify
    │       PASS ↓
    │
    └─► Staging EC2 (13.202.105.210)
            CloudPanel + Nginx
            Theme files deploy (SCP)
                │
                │ QA approve
                ▼
           Production Server
           (Lightsail per client)

wp-admin Access (Enfection Hub)

Developer → hub.enfection.com (company Google account)
    → 🌐 WordPress sites → "Sign in to wp-admin"
    → [client].dev.enfection.com/wp-login.php?action=enfection_hub
    → Enfection Hub SSO plugin creates/logs in the Administrator account
  • The new-project script registers each staging site in Enfection Hub → Admin → WP sites (API token HUB_API_TOKEN in ~/.enfection-config) and installs the plugin with WP-CLI.
  • Hub-created accounts can only sign in through the hub (no WordPress password / reset), so removing a developer in Admin → WP sites locks them out. The CloudPanel admin account (Vaultwarden) stays as the DevOps fallback.

Servers

Server IP Spec Cost
SonarQube 43.205.140.176 t3.micro ~$8.50/mo
Staging 13.202.105.210 t3.small ~$17/mo
Production Per client Lightsail $5 $5/mo each
Enfection Hub hub.enfection.com Cloudflare Workers + D1 Free tier

DNS (Cloudflare)

sonarqube.enfection.com     → 43.205.140.176  (DNS only)
dev.enfection.com   → 13.202.105.210 (DNS only)
*.dev.enfection.com → 13.202.105.210 (DNS only)