- Traffic diagram corrected: both app and api route through ae_web_dev - Removed outdated 'two options' scaling section for ae_app - Added port reference table to CHEATSHEET - Scaling section simplified: change replicas, done, home nginx never changes - localhost link corrected from 3001 to 8888 (LAN HTTP via ae_web_dev)
42 lines
2.3 KiB
Markdown
42 lines
2.3 KiB
Markdown
# Aether Docker Cheat Sheet 🚀
|
|
|
|
## 🚀 Deployment & Updates
|
|
- **Full Rebuild:** `docker compose up -d --build`
|
|
- **Rebuild SvelteKit only:** `docker compose up -d --build ae_app`
|
|
- **Restart API (pick up Python changes):** `docker compose restart ae_api`
|
|
- **Switch Build Mode:** Edit `.env` → `AE_APP_BUILD_MODE=prod` → `docker compose up -d --build ae_app`
|
|
- **Shut everything down:** `npm run compose:down` (from `aether_app_sveltekit/`)
|
|
|
|
## 🛠️ Management Links
|
|
- **SvelteKit Frontend:** [http://localhost:8888](http://localhost:8888) (LAN HTTP via ae_web_dev)
|
|
- **FastAPI Docs:** [https://dev-api.oneskyit.com/docs](https://dev-api.oneskyit.com/docs)
|
|
- **Database (phpMyAdmin):** [http://localhost:8081](http://localhost:8081) (requires `--profile database`)
|
|
- **Logs (Dozzle):** [http://localhost:8881](http://localhost:8881)
|
|
|
|
## 🔌 Port Reference
|
|
| Port | Variable | Purpose |
|
|
|------|-----------------------|--------------------------------------------------|
|
|
| 3001 | `AE_APP_GATEWAY_PORT` | App gateway — home nginx → ae_app replicas |
|
|
| 5060 | `AE_API_GATEWAY_PORT` | API gateway — home nginx → ae_api replicas |
|
|
| 8888 | `OSIT_WEB_HTTP_PORT` | LAN HTTP direct access (no home server needed) |
|
|
| 8081 | `AE_PMA_PORT` | phpMyAdmin (database profile only) |
|
|
| 8881 | — | Dozzle log viewer |
|
|
| 3306 | `AE_DB_EXTERNAL_PORT` | MariaDB direct (database profile only) |
|
|
|
|
## 📈 Scaling
|
|
Both services scale via Docker DNS round-robin inside `ae_web_dev`.
|
|
Home server nginx **never needs to change** — it always points to the same port.
|
|
|
|
- Edit `.env` → `AE_APP_REPLICAS=X` or `AE_API_REPLICAS=X`
|
|
- Run `docker compose up -d` (or `up -d ae_app` for app-only)
|
|
|
|
## 💾 Database Operations
|
|
- **Manual Backup:** `./backup_db.sh` (hot backup, live container)
|
|
- **Manual Restore:** `./restore_db.sh [path_to_file.gz]`
|
|
- **Conference Export:** `./export_db.sh` (saves to `backups/conference_export/`)
|
|
- **Automated Import:** Drop file in `backups/import/` → run `./check_and_import.sh`
|
|
|
|
## 🧹 Maintenance
|
|
- **Internal Logs:** Docker handles rotation automatically (10MB limit).
|
|
- **Dozzle:** Live log viewer at port 8881 — no auth currently (LAN only).
|