Commit 70993869 authored by Hendrik Garske's avatar Hendrik Garske

Fix: WG API URL fuer CapRover Backend-Konfiguration angepasst

parent 6dea7a86
......@@ -66,11 +66,22 @@ npm run dev
Die Anwendung läuft jetzt auf [http://localhost:3000](http://localhost:3000)
**Wichtig:** Die Anwendung ist bereits vollständig konfiguriert mit:
- **WG_API_URL**: `https://corex-wg-easy.corexmanagement.de`
- **WG_PASSWORD**: `CoreX2024!Secure#VPN`
**Wichtig:** Die Anwendung benötigt eine WireGuard Easy Backend-Instanz.
### Backend-Konfiguration
In CapRover muss das wg-easy Backend separat konfiguriert werden:
**Keine .env Datei erforderlich!** Die Standardwerte sind direkt im Code konfiguriert.
1. **Backend-URL**: Setze `WG_API_URL` als Environment Variable in CapRover
- Wenn Backend als CapRover Service: `http://srv-captain--wg-easy-backend:51821`
- Wenn Backend extern: `http://corex-wg-easy.corexmanagement.de:51821`
- Wenn Backend auf separater Subdomain: `https://wg-easy-api.corexmanagement.de`
2. **Backend-Passwort**: Setze `WG_PASSWORD` als Environment Variable (Standard: `CoreX2024!Secure#VPN`)
**Standardwerte (wenn keine Environment Variables gesetzt):**
- **WG_API_URL**: `http://srv-captain--wg-easy-backend:51821` (interner CapRover Service-Name)
- **WG_PASSWORD**: `CoreX2024!Secure#VPN`
## 🐳 Docker Setup
......
// WireGuard Easy API Client
const WG_API_URL = process.env.WG_API_URL || 'https://corex-wg-easy.corexmanagement.de'
// WG API URL Konfiguration
// In CapRover: Das Frontend läuft auf Port 3000, das Backend muss separat konfiguriert sein
//
// Optionen für das Backend:
// 1. Backend als separater CapRover Service: Verwende den internen Service-Namen
// z.B. 'http://srv-captain--wg-easy-backend:51821' (wenn Backend als CapRover App läuft)
// 2. Backend extern auf Port: 'http://corex-wg-easy.corexmanagement.de:51821'
// 3. Backend auf separater Subdomain: 'https://wg-easy-api.corexmanagement.de'
//
// In CapRover: Setze WG_API_URL als Environment Variable für die App
const WG_API_URL = process.env.WG_API_URL || 'http://srv-captain--wg-easy-backend:51821'
const WG_PASSWORD = process.env.WG_PASSWORD || 'CoreX2024!Secure#VPN'
interface WgClient {
......
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