# TRA local / staging / production environment matrix

Secrets never belong in git. Copy `.env.example` → `.env` and fill values.

| Key | Local | Staging | Production | Notes |
|-----|-------|---------|------------|-------|
| `APP_ENV` | local | staging | production | |
| `APP_DEBUG` | true | false | false | |
| `APP_URL` | https://tra.ronnieridge.com | staging URL | production URL | |
| `DB_*` | `ronnie_tra` | staging DB | prod DB | user `ronnie_tra` |
| `REDIS_*` | 127.0.0.1 | shared/dedicated | dedicated | `REDIS_CLIENT=predis` (no phpredis on this host) |
| `QUEUE_CONNECTION` | redis | redis | redis | Horizon workers |
| `CACHE_STORE` | redis | redis | redis | |
| `SESSION_DRIVER` | redis | redis | redis | `SESSION_SECURE_COOKIE=true` |
| `BROADCAST_CONNECTION` | reverb | reverb | reverb | |
| `REVERB_*` | local keys | staging keys | prod keys | |
| `SCOUT_DRIVER` | meilisearch | meilisearch | meilisearch | Meilisearch may be deferred (Docker) |
| `MEILISEARCH_HOST` | http://127.0.0.1:7700 | internal | internal | Health shows `degraded` if down |
| `AWS_*` / `FILESYSTEM_DISK` | local | s3 | s3 | Object storage for media |
| `MAIL_*` | log | smtp/ses | smtp/ses | |

## Services expected

- PHP 8.5 + Composer + Node 20+
- MySQL/MariaDB
- Redis
- Nginx/Apache (cPanel) → `public/`
- Horizon process
- Reverb process (optional until realtime used)
- Meilisearch (optional until Phase 1 search)
