127 lines
3.1 KiB
Markdown
127 lines
3.1 KiB
Markdown
|
|
# 🎯 Aktueller Status - Pfandsystem Migration
|
||
|
|
|
||
|
|
## ✅ Was funktioniert
|
||
|
|
|
||
|
|
### 1. Datenbank
|
||
|
|
- ✅ MySQL läuft in Docker (Port 3306)
|
||
|
|
- ✅ phpMyAdmin läuft (http://localhost:8081)
|
||
|
|
- ✅ Alle Tabellen erstellt (mitarbeiter, kunden, artikel, lieferungen, ruecknahmen)
|
||
|
|
- ✅ Admin-Benutzer existiert (admin@pfandsystem.de / admin123)
|
||
|
|
|
||
|
|
### 2. Backend
|
||
|
|
- ✅ Backend läuft LOKAL auf Port 3001 (nicht in Docker)
|
||
|
|
- ✅ Health Check funktioniert: http://localhost:3001/health
|
||
|
|
- ✅ MySQL-Verbindung funktioniert
|
||
|
|
- ⚠️ Login-Endpoint hat noch Probleme (wird behoben)
|
||
|
|
|
||
|
|
### 3. Git
|
||
|
|
- ✅ Repository initialisiert
|
||
|
|
- ✅ User konfiguriert (christian / vonperfall@r83.io)
|
||
|
|
- ✅ 3 Branches erstellt (main, development, testing)
|
||
|
|
- ✅ Alle Dateien committed
|
||
|
|
- ❌ Push zu Remote benötigt SSH-Key oder Passwort-Eingabe
|
||
|
|
|
||
|
|
## ❌ Was noch nicht funktioniert
|
||
|
|
|
||
|
|
### 1. Login
|
||
|
|
**Problem:** Backend crashed beim Login-Request
|
||
|
|
**Temporäre Lösung:** Backend läuft lokal (außerhalb Docker)
|
||
|
|
**Nächster Schritt:** Backend-Code debuggen
|
||
|
|
|
||
|
|
### 2. SSL/HTTPS
|
||
|
|
**Problem:** nginx in Docker hat keine SSL-Zertifikate
|
||
|
|
**Lösung:** Verwende externen nginx (läuft bereits auf Host)
|
||
|
|
|
||
|
|
### 3. Git Push
|
||
|
|
**Problem:** SSH-Key fehlt für git@49.13.154.75:2244
|
||
|
|
**Lösung:** Du musst manuell pushen mit deinem Passwort
|
||
|
|
|
||
|
|
## 📋 Manuelle Schritte für dich
|
||
|
|
|
||
|
|
### Git Push (mit Passwort)
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# SSH-Variante (benötigt Passwort-Eingabe)
|
||
|
|
git remote remove origin
|
||
|
|
git remote add origin ssh://git@49.13.154.75:2244/christian/pfandsystem.git
|
||
|
|
|
||
|
|
# Pushen (du wirst nach Passwort gefragt)
|
||
|
|
git push -u origin main
|
||
|
|
git push origin development
|
||
|
|
git push origin testing
|
||
|
|
```
|
||
|
|
|
||
|
|
### Backend-Login-Problem beheben
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# 1. Backend-Logs prüfen
|
||
|
|
cd /root/backend
|
||
|
|
npm start
|
||
|
|
|
||
|
|
# In anderem Terminal:
|
||
|
|
curl -X POST http://localhost:3001/api/auth/login \
|
||
|
|
-H "Content-Type: application/json" \
|
||
|
|
-d '{"email":"admin@pfandsystem.de","password":"admin123"}'
|
||
|
|
|
||
|
|
# Fehler im ersten Terminal sehen
|
||
|
|
```
|
||
|
|
|
||
|
|
### Frontend testen
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# 1. .env anpassen
|
||
|
|
echo "VITE_API_URL=http://pfandsystem.backdigital.de/api" > /root/.env
|
||
|
|
|
||
|
|
# 2. Neu bauen
|
||
|
|
npm run build
|
||
|
|
node fix-manifest-link.cjs
|
||
|
|
|
||
|
|
# 3. Testen
|
||
|
|
# Öffne: http://pfandsystem.backdigital.de
|
||
|
|
```
|
||
|
|
|
||
|
|
## 🔧 Schnell-Befehle
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# MySQL & phpMyAdmin starten
|
||
|
|
docker compose up -d mysql phpmyadmin
|
||
|
|
|
||
|
|
# Backend lokal starten
|
||
|
|
cd /root/backend && npm start &
|
||
|
|
|
||
|
|
# Backend-Logs sehen
|
||
|
|
cd /root/backend && npm start
|
||
|
|
|
||
|
|
# Datenbank prüfen
|
||
|
|
docker exec pfandsystem-mysql mysql -u pfandsystem -ppfandsystem_secure_password pfandsystem
|
||
|
|
|
||
|
|
# Git Status
|
||
|
|
git status
|
||
|
|
git log --oneline
|
||
|
|
|
||
|
|
# Container Status
|
||
|
|
docker compose ps
|
||
|
|
```
|
||
|
|
|
||
|
|
## 📊 Ports
|
||
|
|
|
||
|
|
- **3001** - Backend API (lokal)
|
||
|
|
- **3306** - MySQL
|
||
|
|
- **8081** - phpMyAdmin
|
||
|
|
- **80** - Frontend (nginx in Docker)
|
||
|
|
- **443** - HTTPS (externer nginx auf Host)
|
||
|
|
|
||
|
|
## 🎯 Nächste Prioritäten
|
||
|
|
|
||
|
|
1. **Backend-Login fixen** (höchste Priorität)
|
||
|
|
2. **Git pushen** (manuell mit Passwort)
|
||
|
|
3. **SSL konfigurieren** (externer nginx)
|
||
|
|
4. **Frontend deployen und testen**
|
||
|
|
|
||
|
|
## 💡 Hinweise
|
||
|
|
|
||
|
|
- Backend läuft aktuell LOKAL (nicht in Docker) wegen Crash-Problem
|
||
|
|
- MySQL läuft in Docker und funktioniert
|
||
|
|
- Git ist konfiguriert, aber Push benötigt deine Passwort-Eingabe
|
||
|
|
- SSL-Zertifikate sind vorhanden, müssen nur konfiguriert werden
|