Commit adc937e4 authored by Hendrik Garske's avatar Hendrik Garske

Fix: Erweitere Backend-URL Erkennung mit Docker-internen Namen

parent ed765603
......@@ -70,15 +70,27 @@ Die Anwendung läuft jetzt auf [http://localhost:3000](http://localhost:3000)
### Backend-Konfiguration
**Wenn Frontend und Backend im gleichen Docker Container laufen:**
Die Anwendung versucht **automatisch**, das Backend zu finden. Es werden verschiedene URLs ausprobiert:
Die Anwendung verwendet automatisch `http://localhost:51821` als Backend-URL (Standard-Port für wg-easy).
1. **Interne Docker-Namen** (wenn als separate Container im gleichen Netzwerk):
- `http://wg-easy:51821`
- `http://wg-easy-backend:51821`
- `http://backend:51821`
2. **CapRover Service-Namen** (wenn als separate Services):
- `http://srv-captain--wg-easy:51821`
- `http://srv-captain--wg-easy-backend:51821`
- `http://srv-captain--corex-wg-easy:51821`
3. **localhost** (wenn beide im gleichen Container):
- `http://localhost:51821`
- `http://127.0.0.1:51821`
**Standardwerte (keine Konfiguration erforderlich):**
- **WG_API_URL**: `http://localhost:51821` (für gleichen Container)
- **WG_API_URL**: Automatische Erkennung (versucht alle oben genannten URLs)
- **WG_PASSWORD**: `CoreX2024!Secure#VPN`
**Wichtig:** Stelle sicher, dass das wg-easy Backend auch im Container läuft und auf Port 51821 hört!
**Hinweis:** Wenn das Backend nicht automatisch gefunden wird, setze `WG_API_URL` in CapRover als Environment Variable auf den tatsächlichen Backend-URL/Service-Namen.
## 🐳 Docker Setup
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment