final-cleanup: Produktionsfertige Konfiguration - Alle Ports auf 443 vereinheitlicht, TLS-Zertifikate vorgeneriert, Zentraler Installer erstellt
This commit is contained in:
191
docs/README.md
Normal file
191
docs/README.md
Normal file
@@ -0,0 +1,191 @@
|
||||
# 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)
|
||||
|
||||
```bash
|
||||
# Repository klonen
|
||||
git clone <repository-url>
|
||||
cd Projektarbeit-MYP
|
||||
|
||||
# Backend installieren
|
||||
./install.sh backend
|
||||
```
|
||||
|
||||
#### Frontend Installation (m040tbaraspi001)
|
||||
|
||||
```bash
|
||||
# Repository klonen
|
||||
git clone <repository-url>
|
||||
cd Projektarbeit-MYP
|
||||
|
||||
# Frontend installieren
|
||||
./install.sh frontend
|
||||
```
|
||||
|
||||
### Services starten
|
||||
|
||||
#### Backend
|
||||
```bash
|
||||
sudo systemctl start myp.service
|
||||
sudo systemctl status myp.service
|
||||
```
|
||||
|
||||
#### Frontend
|
||||
```bash
|
||||
cd frontend
|
||||
docker-compose up -d
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
## 🌐 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
|
||||
|
||||
```bash
|
||||
# Backend
|
||||
curl -k https://raspberrypi/api/test
|
||||
|
||||
# Frontend
|
||||
curl -k https://m040tbaraspi001.de040.corpintra.net/health
|
||||
```
|
||||
|
||||
## 🛠️ Entwicklung
|
||||
|
||||
### Backend Debug-Modus
|
||||
```bash
|
||||
cd backend/app
|
||||
python3.11 app.py --debug
|
||||
```
|
||||
|
||||
### Frontend Development
|
||||
```bash
|
||||
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
|
||||
```bash
|
||||
# systemd Journal
|
||||
sudo journalctl -u myp.service -f
|
||||
|
||||
# Anwendungslogs
|
||||
tail -f backend/app/logs/app/app.log
|
||||
```
|
||||
|
||||
### Frontend
|
||||
```bash
|
||||
# Docker Logs
|
||||
docker-compose logs -f
|
||||
|
||||
# Caddy Logs
|
||||
docker-compose logs caddy
|
||||
```
|
||||
|
||||
## 🆘 Troubleshooting
|
||||
|
||||
### Backend startet nicht
|
||||
```bash
|
||||
# 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
|
||||
```bash
|
||||
# Container Status prüfen
|
||||
docker-compose ps
|
||||
|
||||
# Netzwerk prüfen
|
||||
docker network ls
|
||||
|
||||
# Zertifikate prüfen
|
||||
ls -la frontend/certs/
|
||||
```
|
||||
|
||||
### Verbindungsprobleme
|
||||
```bash
|
||||
# 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.
|
||||
|
Reference in New Issue
Block a user