Grundgerüst für Certain Finance: - Backend: FastAPI + SQLAlchemy + SQLite, Alembic-Migrationen (Batch-Mode), argon2-Passwort-Hashing, server-seitige Sitzungen im Cookie, Erst-Admin, Benutzerverwaltung mit Temporär-Passwort, Einstellungen je Benutzer. - Ein Prozess, ein Port: uvicorn liefert API (/api) und gebautes SPA aus, inkl. SPA-Deeplink-Fallback. - Frontend: React 18 + Vite + JSX, Design-Tokens (Light/Dark), i18n DE/EN, Inline-SVG-Icons (keine Emojis), Login, Passwort-ändern, Dashboard-Platzhalter, Benutzer- und Einstellungsseiten. - Deploy: nativer LXC-Installer + Update-Skript (systemd), env-Vorlage, Doku. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
50 lines
1.6 KiB
Markdown
50 lines
1.6 KiB
Markdown
# Deployment (Proxmox-LXC + Nginx Proxy Manager)
|
|
|
|
## Installation
|
|
|
|
Im LXC (Debian/Ubuntu) das Repo klonen und als root installieren:
|
|
|
|
```bash
|
|
git clone <repo-url> /opt/certain-finance
|
|
cd /opt/certain-finance
|
|
sudo ./deploy/install.sh
|
|
```
|
|
|
|
Das Skript installiert Python/Node, richtet eine venv ein, baut das Frontend,
|
|
erzeugt `/etc/certain-finance/env` (mit Zufallsgeheimnissen), legt den systemd-
|
|
Dienst `certain-finance` an und startet ihn. Node wird **nur zum Bauen** gebraucht;
|
|
der laufende Dienst ist reines Python.
|
|
|
|
## Nginx Proxy Manager
|
|
|
|
Neuen **Proxy Host** anlegen:
|
|
|
|
- **Domain Names:** deine (Sub-)Domain
|
|
- **Scheme:** `http`
|
|
- **Forward Hostname / IP:** IP dieses LXC
|
|
- **Forward Port:** Wert von `APP_PORT` (Standard `8071`)
|
|
- **Block Common Exploits:** an
|
|
- **Websockets Support:** nicht nötig
|
|
- **SSL:** Let's Encrypt-Zertifikat anfordern, „Force SSL" an
|
|
|
|
Für spätere CSV-/PDF-Uploads in den *Advanced*-Einstellungen des Hosts
|
|
`client_max_body_size 20m;` setzen.
|
|
|
|
Da HTTPS extern terminiert, sind die Sitzungs-Cookies `Secure`
|
|
(`APP_COOKIE_SECURE=true`). Der Dienst selbst lauscht nur auf `127.0.0.1`.
|
|
|
|
## Betrieb
|
|
|
|
```bash
|
|
systemctl status certain-finance # Status
|
|
journalctl -u certain-finance -f # Logs
|
|
systemctl restart certain-finance # Neustart
|
|
sudo ./deploy/update.sh # Update (git pull + build + Migration + Neustart)
|
|
```
|
|
|
|
## Backup
|
|
|
|
Die Datenbank liegt unter `/var/lib/certain-finance/app.db`. `update.sh` legt vor
|
|
jeder Migration automatisch eine Kopie unter `/var/lib/certain-finance/backups/`
|
|
an. Zusätzlich empfiehlt sich ein Proxmox-`vzdump`-Snapshot des Containers.
|