|
| 1 | +# Architecture Overview |
| 2 | + |
| 3 | +Warden runs three layers of services on your development machine: |
| 4 | + |
| 5 | +```{mermaid} |
| 6 | +flowchart TB |
| 7 | + classDef default fill:#ffffff,stroke:#3f51b5,stroke-width:1.5px,color:#000000,font-weight:bold,font-size:12px; |
| 8 | +
|
| 9 | + subgraph DevSys ["Developer's System"] |
| 10 | + direction TB |
| 11 | +
|
| 12 | + subgraph Host ["Host Services"] |
| 13 | + direction LR |
| 14 | + h1["Warden CLI"] ~~~ h2["Docker Engine"] ~~~ h3["Mutagen File Sync"] ~~~ h4["Trusted SSL Root CA"] |
| 15 | + end |
| 16 | +
|
| 17 | + subgraph Global ["Global Docker Services — warden svc up"] |
| 18 | + direction LR |
| 19 | + g1["Traefik<br>Reverse Proxy + SSL"] ~~~ g2["DNSmasq"] ~~~ g3["Mailpit<br>Email Catcher"] ~~~ g4["SSH Tunnel"] ~~~ g5["phpMyAdmin"] ~~~ g6["Portainer"] |
| 20 | + end |
| 21 | +
|
| 22 | + subgraph Project ["Per-Project Docker Services — warden env up"] |
| 23 | + direction LR |
| 24 | + p1["Nginx"] ~~~ p2["PHP-FPM"] ~~~ p3["MariaDB / MySQL"] ~~~ p4["Redis / Valkey"] ~~~ p5["Elasticsearch /<br>OpenSearch"] ~~~ p6["RabbitMQ"] ~~~ p7["Varnish"] |
| 25 | + end |
| 26 | +
|
| 27 | + Host ~~~ Global ~~~ Project |
| 28 | + end |
| 29 | +
|
| 30 | + style DevSys fill:#f5f5f5,stroke:#666666,stroke-width:1px,rx:8,ry:8 |
| 31 | + style Host fill:transparent,stroke:none |
| 32 | + style Global fill:#fff3e0,stroke:#FF9800,stroke-width:1px,rx:8,ry:8 |
| 33 | + style Project fill:#e8f5e9,stroke:#4CAF50,stroke-width:1px,stroke-dasharray: 5 5,rx:8,ry:8 |
| 34 | +``` |
| 35 | + |
| 36 | +## Host Services |
| 37 | + |
| 38 | +The Warden CLI orchestrates everything via Docker Compose. On your host machine: |
| 39 | + |
| 40 | +- **Warden CLI** — Bash tool that manages all Docker services |
| 41 | +- **Docker Engine** — Runs all containers |
| 42 | +- **Mutagen** — Bi-directional file sync between host and containers (macOS) |
| 43 | +- **Trusted SSL Root CA** — Local certificate authority for `*.test` HTTPS domains |
| 44 | + |
| 45 | +## Global Docker Services |
| 46 | + |
| 47 | +Started once with `warden svc up`, shared across all projects: |
| 48 | + |
| 49 | +| Service | Purpose | URL | |
| 50 | +|---------|---------|-----| |
| 51 | +| Traefik | Reverse proxy + SSL termination | traefik.warden.test | |
| 52 | +| DNSmasq | DNS resolver for `*.test` domains | — | |
| 53 | +| Mailpit | Email catcher (SMTP) | webmail.warden.test | |
| 54 | +| SSH Tunnel | Database access for GUI clients (:2222) | — | |
| 55 | +| phpMyAdmin | Database management UI | phpmyadmin.warden.test | |
| 56 | +| Portainer | Container management UI (opt-in) | portainer.warden.test | |
| 57 | + |
| 58 | +## Per-Project Docker Services |
| 59 | + |
| 60 | +Started per project with `warden env up`, each on an isolated Docker network: |
| 61 | + |
| 62 | +| Service | Default | Toggle Flag | |
| 63 | +|---------|---------|-------------| |
| 64 | +| Nginx | All types | `WARDEN_NGINX` | |
| 65 | +| PHP-FPM | All types | — | |
| 66 | +| MariaDB / MySQL | All types | `WARDEN_DB` | |
| 67 | +| Redis / Valkey | All types | `WARDEN_REDIS` / `WARDEN_VALKEY` | |
| 68 | +| Elasticsearch / OpenSearch | Magento 2 | `WARDEN_ELASTICSEARCH` / `WARDEN_OPENSEARCH` | |
| 69 | +| RabbitMQ | Magento 2 | `WARDEN_RABBITMQ` | |
| 70 | +| Varnish | Magento 2 | `WARDEN_VARNISH` | |
| 71 | + |
| 72 | +### Additional Optional Services |
| 73 | + |
| 74 | +These can be enabled per-project via flags in your `.env` file: |
| 75 | + |
| 76 | +- **Blackfire** / **SPX** — PHP profiling (`WARDEN_BLACKFIRE`, `WARDEN_PHP_SPX`) |
| 77 | +- **Selenium** — Browser automation testing with optional VNC (`WARDEN_SELENIUM`) |
| 78 | +- **Allure** — Test report dashboard (`WARDEN_ALLURE`) |
| 79 | +- **PHP-Debug** — Xdebug-enabled PHP-FPM (used via `warden debug`) |
| 80 | +- **ElasticHQ** — Elasticsearch management UI (`WARDEN_ELASTICHQ`) |
0 commit comments