feat: complete dockerization architecture with data/logs persistence and prod export script v1.3.0

This commit is contained in:
Daniel Bedeleanu
2026-04-11 12:32:06 +03:00
parent c71a815792
commit 2e5ce8d153
15 changed files with 485 additions and 23 deletions

View File

@@ -1,3 +1,24 @@
### [2026-04-11 12:45] v1.3.0: Dockerization & Export Script
**Purpose:** Upgraded the system architecture to support seamless dual-mode execution (Dockerized or Bare-Metal/Local). Extracted data and logic persistence layers to external volumes (`/data`, `/logs`). Added a dedicated production compiler.
**Actions:**
- `backend/database.py` and `users.py` now support `DATA_DIR` environment overrides.
- Implemented `backend/logger.py` for standard Python rotating logs mapped to `/app/logs`.
- Next.js configured for `standalone` output mode to strictly optimize containerized PWA size.
- Orchestrated full environment with `docker-compose.yml`, using Caddy for local self-signed HTTPS termination.
- Created `export_prod.sh` to extract a clean release bundle without AI/Dev files (using optimized `rsync`).
**Modified Files:**
- `backend/database.py`
- `backend/routers/users.py`
- `backend/logger.py` (New)
- `backend/main.py`
- `frontend/next.config.mjs`
- `frontend/Dockerfile` (New)
- `backend/Dockerfile` (New)
- `docker-compose.yml` (New)
- `Caddyfile` (New)
- `export_prod.sh` (New)
- `VERSION.json`
### [2026-04-11 12:35] v1.2.9: Automatic IDE Entry Points
**Purpose:** Restored specific ID-based entry points (`GEMINI.md` and `CLAUDE.md`) as "Proxy Pointers" to ensure modern AI extensions (Cursor, Windsurf, Gemini IDE) naturally pick them up as system prompt injections.
**Modified Files:**

View File

@@ -1,15 +1,18 @@
# AI Session State - HANDOVER
# CURRENT AI WORKING SESSION
**Status**: v1.2.6 Hotfixed & UX Polished. Persistent Gemini Context Created.
**Current AI Agent**: Gemini (Antigravity)
**Context**:
- **Offline Auth**: LDAP users now have local password hash caching (v1.2.4).
- **UI Affordance**: Added `ChevronDown` to selects and softened password dots.
- **Icon Sync**: Unified iconography (Layers = Categories, Package = Item Types).
- **Memory**: Created [GEMINI.md](../GEMINI.md) as the persistent entry point for this agent.
- **Version**: Currently at **v1.2.6**. Commit log in `ARCHIVE_LOGS.md`.
**Active AI:** Antigravity (Gemini)
**Last Updated:** 2026-04-11
**Current Version:** v1.3.0
**Branch:** dev
**Next Steps**:
1. **Phase 6: Advanced Audit Dashboard**. Current logs exist but could use a dedicated page with filtering.
2. Final testing of offline LDAP login (Basement simulation).
3. Verification of icon consistency in any new screens.
### Current Status
Finalized the system refactoring by implementing a complete, portable **Dockerization Architecture**. Introduced the `export_prod.sh` bundle compiler, centralized technical documentation into a Single Source Of Truth (`PROJECT_ARCHITECTURE.md`), and ensured exact reverse compatibility so that bare-metal development using `./start_server.sh` operates identically to previous versions.
### Technical Context
- **Persistence Mapping:** Local database (`inventory.db`) and `ldap_config.json` now persist through the environmental variable `DATA_DIR` (mapped to local `/data` volume).
- **Log System:** Created `backend/logger.py` with Python's RotatingFileHandler. Streamed locally into `/logs`.
- **Standalone:** Next.js uses `output: standalone` configuration specifically to support the Node alpine dockerfile. Caddy replaces `local-ssl-proxy` only inside the Docker environment.
### Next Steps / Blockers
1. Testing actual AI flow in production mode (using the exported Production Bundle zip).
2. Implementing the Advanced Audit log Dashboard inside the UI.