6.4 KiB
6.4 KiB
MYP Reservation Platform
Mercedes-Benz Werk 040 Berlin - 3D-Drucker Reservierungsplattform
🚀 Schnellstart
MYP Control Center (Empfohlen)
Das zentrale Installationssystem für alle Komponenten:
# Repository klonen
git clone <repository-url>
cd Projektarbeit-MYP
# MYP Control Center starten
./myp_installer.sh
Das MYP Control Center bietet:
- Schnellstart-Installationen (Vollständig, Backend-Only, Entwicklung)
- Produktions-Installer (Integration der v3.2 install.sh Funktionalität)
- Granulare Installation (Einzelne Komponenten)
- System & Wartung (Tests, Status, Informationen)
Direkter Produktions-Installer
Für schnelle Produktions-Deployments direkt im MYP Control Center → Option 4:
./myp_installer.sh
# → Wähle Option 4: Produktions-Installer
# → Backend installieren (Raspberry Pi)
# → Frontend installieren (Docker)
Voraussetzungen
- Backend (Raspberry Pi): Python 3.11, systemd
- Frontend (m040tbaraspi001): Docker, Docker Compose
🌐 Zugriff
- Frontend: https://m040tbaraspi001.de040.corpintra.net
- Backend API: https://raspberrypi/api
🔧 Konfiguration
Netzwerk
Komponente | Hostname | IP | Port |
---|---|---|---|
Frontend | m040tbaraspi001.de040.corpintra.net | 192.168.0.109 | 443 |
Backend | raspberrypi | 192.168.0.105 | 443 |
TLS-Zertifikate
Selbstsignierte Zertifikate werden automatisch generiert:
- Backend:
backend/app/certs/
- Frontend:
frontend/certs/
📊 Health Checks
# Backend
curl -k https://raspberrypi/api/test
# Frontend
curl -k https://m040tbaraspi001.de040.corpintra.net/health
🛠️ Entwicklung
MYP Control Center (Entwicklungs-Setup)
./myp_installer.sh
# → Option 3: Entwicklungs-Setup
MYP Kiosk-Modus (Produktions-bereit)
Das Backend bietet parallel zur API auch ein vollständiges Web-Interface für Kiosk-Betrieb:
./myp_installer.sh
# → Option 2: Backend-Only Installation (mit Kiosk Web Interface)
# oder
# → Option 5: Granulare Installation → Kiosk-Modus installieren
Kiosk-Features:
- ✅ Web-Interface parallel zur API - Kein separates Frontend nötig
- ✅ Touch-optimierte Bedienung - Ideal für Raspberry Pi Touchscreens
- ✅ Automatischer Browser-Start - Vollbild-Modus beim Boot
- ✅ systemd Integration - Service-basierte Kiosk-Verwaltung
- ✅ Produktions-bereit - SSL, Logging, Monitoring
Kiosk URLs:
- Hauptinterface:
https://raspberrypi/
- Dashboard:
https://raspberrypi/dashboard
- Drucker-Verwaltung:
https://raspberrypi/printers
- Job-Verwaltung:
https://raspberrypi/jobs
- Admin-Panel:
https://raspberrypi/admin
Manuelle Installation
Backend Debug-Modus
cd backend/app
python3.11 app.py --debug
Frontend Development
cd frontend
npm run dev
Kiosk-Modus manuell starten
# Backend starten
cd backend/app && python app.py
# Kiosk-Browser starten (separates Terminal)
./backend/app/start_kiosk.sh
📁 Projektstruktur
Projektarbeit-MYP/
├── myp_installer.sh # 🎯 HAUPT-INSTALLER (Control Center)
├── backend/
│ ├── app/
│ │ ├── certs/ # TLS-Zertifikate
│ │ ├── database/ # SQLite-Datenbank
│ │ ├── logs/ # Anwendungslogs
│ │ └── app.py # Hauptanwendung
│ ├── myp.service # systemd Service
│ ├── requirements.txt # Python-Abhängigkeiten
│ └── legacy_setup_raspberry_pi.sh # Legacy Skript
├── frontend/
│ ├── certs/ # TLS-Zertifikate
│ ├── docker/
│ │ ├── caddy/
│ │ │ └── Caddyfile # Reverse Proxy Konfiguration
│ │ └── legacy_deploy.sh # Legacy Skript
│ ├── src/ # Next.js Anwendung
│ └── docker-compose.yml
├── scripts/
│ └── legacy_generate_certs.sh # Legacy Skript
├── archiv/
│ └── myp_installer_legacy.sh # Archivierte Version
└── docs/ # Dokumentation
Script-Status
Skript | Status | Verwendung |
---|---|---|
myp_installer.sh |
✅ AKTIV | Haupt-Control-Center |
*legacy_*.sh |
📦 Legacy | Historische Versionen |
archiv/myp_installer_legacy.sh |
📦 Archiv | Alte Version 4.0 |
🔒 Sicherheit
- HTTPS-only (Port 443)
- Selbstsignierte TLS-Zertifikate
- HTTP → HTTPS Redirect
- Security Headers (HSTS, CSP, etc.)
📝 Logs
Backend
# systemd Journal
sudo journalctl -u myp.service -f
# Anwendungslogs
tail -f backend/app/logs/app/app.log
Frontend
# Docker Logs
docker-compose logs -f
# Caddy Logs
docker-compose logs caddy
Kiosk-Modus
# Backend Service
sudo systemctl status myp.service
# Kiosk-Browser Service
sudo systemctl status myp-kiosk-browser.service
# Kiosk-Browser Logs
sudo journalctl -u myp-kiosk-browser.service -f
🔧 Services
Backend Services
# Backend starten/stoppen
sudo systemctl start myp.service
sudo systemctl stop myp.service
sudo systemctl restart myp.service
# Kiosk-Browser starten/stoppen (falls installiert)
sudo systemctl start myp-kiosk-browser.service
sudo systemctl stop myp-kiosk-browser.service
# Automatischen Start aktivieren/deaktivieren
sudo systemctl enable myp.service
sudo systemctl enable myp-kiosk-browser.service
🆘 Troubleshooting
MYP Control Center verwenden
./myp_installer.sh
# → Option 6: Systemvoraussetzungen prüfen
# → Option 7: Anwendung starten
Backend startet nicht
# Service Status prüfen
sudo systemctl status myp.service
# Logs prüfen
sudo journalctl -u myp.service --no-pager
# Zertifikate prüfen
ls -la backend/app/certs/
Frontend nicht erreichbar
# Container Status prüfen
docker-compose ps
# Netzwerk prüfen
docker network ls
# Zertifikate prüfen
ls -la frontend/certs/
Verbindungsprobleme
# DNS auflösen
nslookup raspberrypi
nslookup m040tbaraspi001.de040.corpintra.net
# Ports prüfen
netstat -tlnp | grep :443
📋 Version
- Version: 3.2-final
- Control Center: v4.0 mit v3.2 Integration
- Build: Production
- Installer: MYP Control Center
👥 Support
Bei Problemen verwenden Sie das MYP Control Center oder wenden Sie sich an das IT-Team des Mercedes-Benz Werk 040 Berlin.