README aktualisiert (Port 5001, Settings, Logo, proxmox-update)

This commit is contained in:
Erik Thiele
2026-07-02 16:48:04 +02:00
parent 0522a4c457
commit 980549faa3
2 changed files with 34 additions and 655 deletions

View File

@@ -15,15 +15,17 @@ pip install flask fpdf2 pyyaml
python app.py
```
-> http://127.0.0.1:5000
-> http://127.0.0.1:5001
## Funktionen
- **Live-Berechnung** bei jeder Eingabe (Material, Strom, Abschreibung, Arbeit, Gewinn)
- **Dark Mode** (persistiert in YAML-Konfiguration)
- **PDF-Rechnung** mit Kundendaten (via fpdf2)
- **PDF-Rechnung** mit Logo, Kundendaten und Positionstabelle (via fpdf2)
- **TXT-Export** der Kalkulation
- **Auto-Save** aller Werte via AJAX (debounced 500ms)
- **Einstellungsseite** für Druckerabschreibung, Arbeitskosten, MwSt., Stromkosten, Firmendaten, Logo
- **Logo-Upload** (PNG/JPEG/WebP) für die Rechnung
## Installation auf Proxmox (LXC-Container)
@@ -37,7 +39,7 @@ systemd-Service ein.
bash -c "$(curl -fsSL https://gitea.teamthiele.de/ethiele/3ddruckkalkulation/raw/branch/main/proxmox-setup.sh)"
```
Nach Abschluss ist die App unter `http://<CONTAINER-IP>:5000` erreichbar.
Nach Abschluss ist die App unter `http://<CONTAINER-IP>:5001` erreichbar.
Container-ID und Name konnen als Argumente ubergeben werden:
```bash
@@ -52,6 +54,25 @@ systemctl status 3ddruck-kalkulation.service
journalctl -u 3ddruck-kalkulation.service -f
```
## Update des Containers
`proxmox-update.sh` aktualisiert den Container via Git und startet den Service neu.
**Im Container ausfuhren:**
```bash
./proxmox-update.sh
```
**Vom Proxmox-Host aus:**
```bash
./proxmox-update.sh 201
```
Das Skript holt via `curl` die aktuelle Version aus dem Gitea-Repo, pullt,
installiert ggf. neue Dependencies und restartet den systemd-Service.
## Technik
| Komponente | Technologie |
@@ -65,13 +86,16 @@ journalctl -u 3ddruck-kalkulation.service -f
## Projektstruktur
```
app.py # Flask-Server mit allen Routen
templates/index.html # Hauptseite (Formular + Ergebnisse)
templates/invoice.html # Rechnungsseite
static/style.css # Minimales Custom-CSS
static/script.js # Live-Berechnung + Auto-Save
druckkalkulation_config.yaml # Automatisch erstellte Konfiguration
3dDruckKalkulator.py # Alte Tkinter-Version (unused)
app.py # Flask-Server mit allen Routen
templates/index.html # Hauptseite (Formular + Ergebnisse)
templates/invoice.html # Rechnungsseite
templates/settings.html # Einstellungen
static/style.css # Minimales Custom-CSS
static/script.js # Live-Berechnung + Auto-Save
proxmox-setup.sh # Ersteinrichtung LXC-Container
proxmox-update.sh # Update LXC-Container
druckkalkulation_config.yaml # Automatisch erstellte Konfiguration
3dDruckKalkulator.py # Alte Tkinter-Version (unused)
```
## Hinweise