From 119b10d943a6f6987b2d139e41b7bfae9a20ceca Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 15 Nov 2026 16:18:42 +0100 Subject: [PATCH] docs+chore(setup): Debian 13 statt Ubuntu, versionsneutrale Doku, unattended-upgrades - Doku auf Debian 13 "trixie" umgestellt, Python/PostgreSQL/Redis als Debian-Standard - setup_server.sh installiert und konfiguriert unattended-upgrades (kein Auto-Reboot) Co-Authored-By: Claude Sonnet 5.5 --- README.md | 4 ++-- backend/README.md | 8 ++++---- docs/ARCHITECTURE.md | 6 +++--- docs/architecture.md | 2 +- docs/deployment.md | 2 +- docs/development.md | 2 +- setup_server.sh | 13 ++++++++++++- 7 files changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 032bf77..1d5fd96 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ Zeiterfassung & HR-Tool (Zeiterfassung, Abwesenheiten, Kiosk-Terminals, Reports) ## Tech-Stack -- **Backend**: Python 3.12 · FastAPI · SQLAlchemy (async) · PostgreSQL 16 · Redis 7 · Alembic +- **Backend**: Python 3 (Debian-Standard) · FastAPI · SQLAlchemy (async) · PostgreSQL (Debian-Standard) · Redis · Alembic - **Frontend**: React 18 · TypeScript · Tailwind CSS · Vite -- **Deployment**: nativ auf Ubuntu (systemd + nginx), kein Docker +- **Deployment**: nativ auf Debian (systemd + nginx), kein Docker - **Tests**: pytest + pytest-asyncio + pytest-cov ## Features (Auszug) diff --git a/backend/README.md b/backend/README.md index 46a6a62..b19bd4c 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,15 +1,15 @@ # TimeMaster – agent-01-auth -Backend: Python 3.12 · FastAPI · SQLAlchemy (async) · PostgreSQL · Redis +Backend: Python 3 (Debian-Standard) · FastAPI · SQLAlchemy (async) · PostgreSQL · Redis Laufend nativ auf dem Server (kein Docker in Phase 1). --- -## Voraussetzungen (Ubuntu 22.04 / 24.04) +## Voraussetzungen (Debian 13 "trixie") ```bash sudo apt update && sudo apt install -y \ - python3.12 python3.12-venv python3.12-dev \ + python3 python3-venv python3-dev \ postgresql postgresql-contrib \ redis-server nginx git build-essential libpq-dev ``` @@ -46,7 +46,7 @@ sudo chown $USER:$USER /opt/timemaster git clone https://github.com/dein-repo/timemaster.git /opt/timemaster cd /opt/timemaster/backend -python3.12 -m venv venv +python3 -m venv venv source venv/bin/activate pip install --upgrade pip pip install -r requirements.txt diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 002c566..7effe8d 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -4,9 +4,9 @@ | Schicht | Technologie | |---------|------------| -| Backend | Python 3.12 · FastAPI · SQLAlchemy (async) | -| Datenbank | PostgreSQL 16 | -| Cache / Sessions | Redis 7 | +| Backend | Python 3 (Debian-Standard) · FastAPI · SQLAlchemy (async) | +| Datenbank | PostgreSQL (Debian-Standard) | +| Cache / Sessions | Redis (Debian-Standard) | | Frontend | React 18 · TypeScript · Tailwind CSS | | Prozess-Manager | systemd | | Reverse Proxy | Nginx + Let's Encrypt | diff --git a/docs/architecture.md b/docs/architecture.md index 12e5a7a..4db42b4 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -8,7 +8,7 @@ Stand: 2026-05-24 | Schicht | Technologie | Version | |---------|-------------|---------| -| Backend | Python / FastAPI | 3.12 / 0.115+ | +| Backend | Python / FastAPI | Debian-Standard / 0.115+ | | ORM | SQLAlchemy async | 2.x | | Datenbank | PostgreSQL | 16 | | Cache / Sessions | Redis | 7 | diff --git a/docs/deployment.md b/docs/deployment.md index ee1fff5..cbc7bb8 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -11,7 +11,7 @@ Stand: 2026-05-24 | Primary | 192.168.1.137 | Produktion, Tests, Primär-DB | | Secondary | 192.168.1.164 | Replikat / Fallback | -Beide Server laufen Ubuntu 22.04 oder 24.04 LTS (amd64). Kein Docker in Phase 1 – alle Dienste laufen nativ als systemd-Units. +Beide Server laufen Debian 13 "trixie" (amd64). Kein Docker in Phase 1 – alle Dienste laufen nativ als systemd-Units. --- diff --git a/docs/development.md b/docs/development.md index 1a179db..688e950 100644 --- a/docs/development.md +++ b/docs/development.md @@ -8,7 +8,7 @@ Stand: 2026-05-24 ### Voraussetzungen (lokal) -- Python 3.12+ +- Python 3 (Debian-Standard, aktuell 3.13) - Node.js 20+ und npm - SSH-Zugang zu `root@192.168.1.137` (Tests und Datenbank laufen dort) - Git-Zugang zu `gitea.perlbach24.de/scripte/timemaster.git` diff --git a/setup_server.sh b/setup_server.sh index 4c88f6d..d4e82bc 100644 --- a/setup_server.sh +++ b/setup_server.sh @@ -22,9 +22,20 @@ apt-get install -y \ postgresql postgresql-contrib \ redis-server \ nginx \ - git curl build-essential libpq-dev openssl sudo \ + git curl build-essential libpq-dev openssl sudo unattended-upgrades \ libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b +cat > /etc/apt/apt.conf.d/20auto-upgrades <<'APTEOF' +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "1"; +APT::Periodic::AutocleanInterval "7"; +APTEOF +cat > /etc/apt/apt.conf.d/52timemaster-unattended <<'APTEOF' +Unattended-Upgrade::Automatic-Reboot "false"; +Unattended-Upgrade::Remove-Unused-Dependencies "true"; +APTEOF +systemctl enable --now unattended-upgrades + echo "==> [3/7] PostgreSQL einrichten" systemctl enable postgresql && systemctl start postgresql