Docker: Test-Setup für self-hosted Betrieb (ohne Änderung des App-Teils)

Neuer Ordner docker/ (Dockerfile, docker-entrypoint.sh, docker-compose.yml, README).
Der bestehende App-/Client-Teil (Start.ps1, src/, www/) bleibt unverändert und wird
nur ins Image kopiert. Container-Spezifika laufen ohne Codeeingriff:
- socat-Bridge 0.0.0.0:8080 -> 127.0.0.1:8077 (App bindet weiter nur loopback)
- Datenpfad via XDG_CONFIG_HOME=/data (Volume) - Get-AppDataDir nutzt das auf Linux
- Login über den vorhandenen Device-Code-Flow (WAM/Loopback geht im Container nicht)
Kein Caddy: der vorhandene Reverse-Proxy zieht Port 8080 an.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-09-21 13:28:43 +02:00
co-authored by Claude Opus 4.8
parent fd9fe761bf
commit 9adf4da0d1
4 changed files with 144 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Startet die App unveraendert (bindet auf 127.0.0.1:APP_PORT) und leitet externe
# Verbindungen per socat-Bridge dorthin - so bleibt der App-Code unangetastet.
set -e
: "${APP_PORT:=8077}"
: "${BRIDGE_PORT:=8080}"
# Bridge im Hintergrund: 0.0.0.0:BRIDGE_PORT -> 127.0.0.1:APP_PORT
# (fork = pro Verbindung ein Prozess; reuseaddr = schneller Neustart).
socat "TCP-LISTEN:${BRIDGE_PORT},fork,reuseaddr" "TCP:127.0.0.1:${APP_PORT}" &
# App im Vordergrund (Logs -> stdout). -NoBrowser: im Container kein Desktop/open.
exec pwsh -NoProfile -File /app/Start.ps1 -NoBrowser -Port "${APP_PORT}"