3.5 KiB

MYP Reservation Platform

Mercedes-Benz Werk 040 Berlin - 3D-Drucker Reservierungsplattform

🚀 Schnellstart

Voraussetzungen

  • Backend (Raspberry Pi): Python 3.11, systemd
  • Frontend (m040tbaraspi001): Docker, Docker Compose

Installation

Backend Installation (Raspberry Pi)

# Repository klonen
git clone <repository-url>
cd Projektarbeit-MYP

# Backend installieren
./install.sh backend

Frontend Installation (m040tbaraspi001)

# Repository klonen
git clone <repository-url>
cd Projektarbeit-MYP

# Frontend installieren
./install.sh frontend

Services starten

Backend

sudo systemctl start myp.service
sudo systemctl status myp.service

Frontend

cd frontend
docker-compose up -d
docker-compose logs -f

🌐 Zugriff

🔧 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

Backend Debug-Modus

cd backend/app
python3.11 app.py --debug

Frontend Development

cd frontend
npm run dev

📁 Projektstruktur

Projektarbeit-MYP/
├── backend/
│   ├── app/
│   │   ├── certs/          # TLS-Zertifikate
│   │   ├── database/       # SQLite-Datenbank
│   │   ├── logs/          # Anwendungslogs
│   │   └── app.py         # Hauptanwendung
│   ├── myp.service        # systemd Service
│   └── requirements.txt   # Python-Abhängigkeiten
├── frontend/
│   ├── certs/             # TLS-Zertifikate
│   ├── docker/
│   │   └── caddy/
│   │       └── Caddyfile  # Reverse Proxy Konfiguration
│   ├── src/               # Next.js Anwendung
│   └── docker-compose.yml
├── docs/                  # Dokumentation
├── scripts/               # Hilfsskripte
└── install.sh            # Zentraler Installer

🔒 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

🆘 Troubleshooting

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
  • Build: Production
  • Datum: $(date)

👥 Support

Bei Problemen wenden Sie sich an das IT-Team des Mercedes-Benz Werk 040 Berlin.