updated memory calculation and logo
This commit is contained in:
@@ -38,6 +38,9 @@ Current version: **v0.2.1**
|
||||
- Protected stacks (traefik, cloudflared, felhom-controller) can't be stopped
|
||||
- System info bar on dashboard: RAM, SSD, and HDD usage with progress bars
|
||||
- Docker Compose memory limits enforced via `deploy.resources.limits.memory`
|
||||
- Pre-deploy memory validation (hard block on `mem_request` overcommit, soft warning on `mem_limit` overcommit)
|
||||
- Memory summary bar shown on deploy page before deployment
|
||||
- Felhom.eu logo SVG in sidebar and login page
|
||||
|
||||
### Known issues / next priorities
|
||||
- Cloudflare Tunnel + Traefik TLS: paperless.demo-felhom.eu works locally but shows "Not secure" (certificate chain not fully validated through tunnel)
|
||||
@@ -139,6 +142,7 @@ controller/
|
||||
- **User input**: HDD path, admin password, language, etc.
|
||||
- **"🎲 Generálás"** button next to password fields
|
||||
3. Clicks "Telepítés" → controller:
|
||||
- **Memory validation**: checks `mem_request` against available system RAM (see below)
|
||||
- Validates all required fields (password fields must be explicitly filled or generated)
|
||||
- Generates auto-secrets (DB passwords, hex keys)
|
||||
- Saves `app.yaml` (env vars + locked fields list)
|
||||
@@ -147,6 +151,30 @@ controller/
|
||||
4. Post-deploy: locked fields (DB_PASSWORD, etc.) become read-only
|
||||
5. "Részletek" button opens deploy page in read-only mode showing current config
|
||||
|
||||
### Memory validation during deploy
|
||||
|
||||
Before deploying an app, the controller checks if there's enough RAM. This uses the Kubernetes-inspired `mem_request` / `mem_limit` model:
|
||||
|
||||
| Field | In `.felhom.yml` | Purpose | Validation |
|
||||
|-------|-------------------|---------|------------|
|
||||
| `mem_request` | `resources.mem_request: "500M"` | Expected memory usage during normal operation | **Hard block** — sum of requests must not exceed usable RAM |
|
||||
| `mem_limit` | `resources.mem_limit: "1152M"` | Docker `deploy.resources.limits.memory` total across all containers | **Soft warning** — overcommit is allowed for limits |
|
||||
| `pi_compatible` | `resources.pi_compatible: true` | Whether the app can run on Raspberry Pi | Display-only hint |
|
||||
| `needs_hdd` | `resources.needs_hdd: true` | Whether the app needs external storage | Display-only hint |
|
||||
|
||||
**How it works:**
|
||||
- `usable_memory = total_ram - reserved_memory_mb` (default: 384MB reserved for OS + controller)
|
||||
- If `sum(deployed mem_requests) + new_mem_request > usable_memory` → deploy is **blocked** with error
|
||||
- If `sum(deployed mem_limits) + new_mem_limit > total_ram` → deploy proceeds with **warning**
|
||||
- Apps without `mem_request` set are treated as 0MB (never blocked)
|
||||
- The deploy page shows a memory summary bar before the user clicks deploy
|
||||
|
||||
Configure the reserved memory via `controller.yaml`:
|
||||
```yaml
|
||||
system:
|
||||
reserved_memory_mb: 384 # default
|
||||
```
|
||||
|
||||
### Container state display
|
||||
|
||||
The dashboard shows health-aware container states with distinct colors:
|
||||
@@ -314,6 +342,8 @@ docker compose up -d
|
||||
### Phase 2 — Monitoring & Health
|
||||
- [x] System metrics on dashboard (RAM, SSD, HDD usage bars)
|
||||
- [x] `/api/system/info` endpoint with live resource data
|
||||
- [x] Pre-deploy memory validation (mem_request hard block, mem_limit soft warning)
|
||||
- [x] Memory summary bar on deploy page
|
||||
- [ ] CPU and temperature metrics
|
||||
- [ ] Healthchecks.io ping integration
|
||||
- [ ] Customer notifications (email/Telegram)
|
||||
|
||||
Reference in New Issue
Block a user