41 lines
2.5 KiB
Markdown
41 lines
2.5 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)
|
|
|
|
## 🔌 Multi-Stack Port Reference
|
|
To run multiple stacks (`test`, `bak`, `prod`) on one host, you **must** assign unique host ports in each `.env`.
|
|
|
|
| Port Type | Variable | Example (Test) | Example (Bak) | Example (Prod) |
|
|
|-----------------|-----------------------|----------------|---------------|----------------|
|
|
| App Gateway | `AE_APP_GATEWAY_PORT` | 3009 | 3002 | 3001 |
|
|
| API Gateway | `AE_API_GATEWAY_PORT` | 5063 | 5062 | 5061 |
|
|
| LAN Direct HTTP | `OSIT_WEB_HTTP_PORT` | 32887 | 32891 | 32890 |
|
|
| Dozzle Logs | `AE_DOZZLE_PORT` | 8889 | 8882 | 8881 |
|
|
| MariaDB Direct | `AE_DB_EXTERNAL_PORT` | 32769 | 32770 | 32768 |
|
|
|
|
## 🏗️ Multi-Stack Isolation
|
|
1. **Network Name:** Set `AE_NETWORK_NAME=ae_test_net` (etc) to prevent Docker network name collisions.
|
|
2. **Container Names:** Set `CONTAINER_` variables (e.g., `CONTAINER_WEB=ae_web_test`) to prevent Docker from refusing to start "conflicting" containers.
|
|
3. **Internal Shared Net:** All stacks must connect to `aether_shared_net` to reach a shared MariaDB/Redis.
|
|
|
|
## 💾 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).
|