added fix for deployment race condition

This commit is contained in:
2026-02-14 19:17:01 +01:00
parent 0be798af5d
commit a8096faf59
5 changed files with 55 additions and 21 deletions
+3 -2
View File
@@ -148,13 +148,14 @@ controller/
- **Auto-generated**: DB passwords, secret keys (shown as "✓ Generated")
- **User input**: HDD path, admin password, language, etc.
- **"🎲 Generálás"** button next to password fields
3. Clicks "Telepítés" → controller:
3. Clicks "Telepítés" → `checkBeforeDeploy()` JS guard fetches live state from API first (prevents deploying if already deployed from another tab). Then 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)
- **Updates in-memory state immediately** (so UI shows "deployed" during slow compose ops)
- Runs `docker compose up -d` with env vars injected
- Updates in-memory state immediately (no stale "Telepítés" button)
- On failure: reverts both in-memory state and disk (app.yaml `deployed: false`)
4. **Progress UI** replaces the form with a 3-step progress panel:
- ✅ "Konfiguráció mentve" — shown immediately after API success
- ⏳ "Konténer(ek) indítása..." → ✅ when containers are up