diff --git a/docs/platform/proxmox-server/lxc/ct-117-fluxer/GNAI-025-PLAN_Fluxer-LXC.md b/docs/platform/proxmox-server/lxc/ct-117-fluxer/GNAI-025-PLAN_Fluxer-LXC.md index d9f4bc7..fc1efb9 100644 --- a/docs/platform/proxmox-server/lxc/ct-117-fluxer/GNAI-025-PLAN_Fluxer-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-117-fluxer/GNAI-025-PLAN_Fluxer-LXC.md @@ -21,6 +21,7 @@ | 2026-11-30 | 1.11 | Mistral Vibe | Stack läuft **vollständig und konvergiert** (23 Services Up, seaweedfs-init `Exited (0)` Sollzustand, api/postgres/valkey healthy, app-proxy HTTP 200, `site.yml`-Zweitlauf `changed=0`). Sieben weitere podman-compose/LiveKit-Befunde (Detail in Abschnitt 5a): (a) leer-defaultete `${VAR:-}`-Refs bleiben wörtlich im Container-Env, wenn die Var im .env fehlt → api „Invalid email app base URL"; (b) fehlender Podman-Bridge-Egress → LiveKit-STUN-Crashloop; (c) `depends_on: caddy` crasht podman-compose mit KeyError bei deaktiviertem Edge; (d) gepinnte livekit.yaml erwartet `webhook.api_key: fluxer` → LIVEKIT_API_KEY als Bezeichner fix `fluxer`; (e) `podman wait --condition=running` auf den Oneshot seaweedfs-init blockt ewig; (f) Rollen-Verification um den legitimen `Exited (0)` des Init-Containers erweitert; (g) Idempotenz: SHA-verifizierter Download auf separate `docker-compose.upstream.yml`, aktive Compose nur bei Upstream-Änderung erneuert | | 2026-11-30 | 1.12 | Mistral Vibe / Operator | **Domain-Kollision korrigiert:** `chat.ghostnet.selfhost.eu` ist der live produktive OpenWebUI-Nutzerpfad (GNAI-001 M6, NPM → 10.0.0.90:8081) — Fluxer erhält `fluxer.ghostnet.selfhost.eu`. Umgezogen: CT-117-Inventories (`fluxer_stack_public_domain`), Keycloak-Client-Spec (CT-102-Rolle, Sync zieht die Redirect-URIs per PUT), NPM-Vhost-Rolle (CT 103), Pi-hole-Split-DNS (CT 100, `chat.` bleibt OpenWebUI vorbehalten), Doku. Keycloak-Client war zwischenzeitlich mit `chat.`-URIs angelegt (Phase-7-Lauf), wird beim nächsten Sync automatisch korrigiert | | 2026-11-30 | 1.13 | Mistral Vibe / Operator | **Öffentlicher Pfad live:** `https://fluxer.ghostnet.selfhost.eu` → HTTP 200 (LE-Cert), alle vier CTs konvergiert (`changed=0`). Drei Begleitbefunde: (a) **NPM-Vorfall:** der Feature-Branch hatte den nie gemergten lokalen Branch `lxc/ct-103-gnai-006-disk-housekeeping` nicht (NPM 2.15.1→2.17.1, nginx2root/nginx2shell-CVE-Fix vom 26.11.) — der CT-103-Konvergenzlauf baute den Container per Quadlet auf 2.15.1 zurück, der Admin-Backend crashloopete am Migration-Check (`20260906220000_user_permission_meta.js` existiert erst ab 2.16/2.17; öffentliche Vhosts liefen weiter, Admin-API 502). Merge nachgeholt, Quadlet konvergiert auf 2.17.1, Admin-API 200; (b) **Firewall-DNAT-Befund:** per netavark gepublishte Ports laufen nach PREROUTING-DNAT durch die FORWARD-Kette (Ziel = Container-IP im Podman-Netz), input-only-Regeln sehen solchen Traffic nie — Forward-Regeln für NPM→app-proxy/LiveKit-Signaling und (Voice) WAN-Media-Ports ergänzt; (c) **Keycloak-Sync-Drift:** Keycloak liefert `redirectUris` in wechselnder Reihenfolge zurück — Vergleich im Sync-Skript jetzt ordnungsunempfindlich, sonst Dauer-PUT/`changed=1` | +| 2026-11-30 | 1.14 | Mistral Vibe | **Befund f revidiert — Caddy-Edge als interner Edge aktiviert:** das app-proxy-only-Routing war unvollständig (die SPA lud, aber /api, /gateway, /media, /admin, Static-Assets fielen auf den SPA-Fallback des app-proxy — die App war faktisch nicht bedienbar). NPM bleibt TLS-Edge; der gepinnte Upstream-Caddy läuft auf CT 117 als interner HTTP-Edge auf :8082 (`FLUXER_CADDY_SITE_ADDRESS=:8082`, kein ACME) und routed laut gepinnter Caddyfile alle Pfade zu den Compose-Services. NPM-Vhost: alles → 10.0.0.62:8082 (WS-Upgrade, lange Timeouts), /livekit/-Location entfernt (caddy routed). App-proxy-Port 8080 und LiveKit-Signaling 7880 nicht mehr gepublisht; Firewall: NPM → 8082 (input + DNAT-forward). Verifiziert: `/api/auth/sso/status` öffentlich 200 (echte API-Antwort), `/admin/login` 200, `/.well-known/fluxer` 200; CT-117- und CT-103-Zweitläufe `changed=0` | ## 1. Zweck und Leitentscheidung @@ -50,21 +51,21 @@ fluxerapp/fluxer, fossengineer.com, selfhostedworld.com): | c) **Images/Pinning** | **Machbar.** Offizielle Images `ghcr.io/fluxerapp/fluxer-:v1` (FLUXER_REGISTRY/OWNER/TAG-override-fähig) für api, gateway, worker, media-proxy, app-proxy-self-hosted, static, admin, snowflakes, users, messages, gifs, unfurl, push; Infra: postgres, valkey, nats, meilisearch, seaweedfs, livekit-server, caddy. Die Rolle `fluxer_stack` lädt die upstream-compose am gepinnten Commit mit SHA-256-Check und pinnt Images per Digest (Platzhalter `PENDING-*` failen hart, bis der Operator pinnt). | ✅ | | d) **Performance** | **Machbar mit Dimensionierung.** Upstream-compose: ~21 Services, docker memory limits summiert ~19,3 GB (Reservierungen deutlich darunter). Für einen Freundeskreis reicht 1 Shard; die Ghostnet-Override setzt upstream-eigene `FLUXER_*_MEMORY_LIMIT`-Knobs (Summe ~6 GiB). CT-Profil: **4 Cores / 8192 MiB RAM / 2048 MiB Swap / 64 GiB rootfs** (`local-lvm`). Ob der PVE-Host das tragen kann, muss der Operator vor Anlage prüfen (`free -h`/`pct config`-Summe auf dem Host — Agent hat keinen pct-Zugang). Erste Last nach Go-Live beobachten (`podman stats`), RAM ggf. auf 12–16 GiB hochziehen. | ✅ mit Bedingung | | e) **VoIP (LiveKit) hinter NPM** | **Eingeschränkt.** Signaling/WS geht über NPM (`/livekit/` → 10.0.0.62:7880). WebRTC-Media braucht direkte Erreichbarkeit: TCP 7881, UDP 3478 (TURN/STUN), UDP 50000–50100 (RTP) — am besten FRITZ!Box-Portweiterleitung auf 10.0.0.62 plus `use_external_ip`. Alternative: TURN-Server oder Voice deaktivieren (`fluxer_stack_voice_enabled=false`, dann keine WAN-Media-Ports). | ⚠️ nur mit Portweiterleitung | -| f) **Edge/TLS** | **Machbar ohne upstream Caddy.** NPM (CT 103) terminiert TLS (bestehender Wildcard-/A-Record-Mechanismus für `*.ghostnet.selfhost.eu`), die Ghostnet-Override deaktiviert den Caddy-Edge (`profiles: [ghostnet-disabled-edge]`, keine veröffentlichten 80/443) und published nur app-proxy 8080 + LiveKit-Ports auf der CT-IP; nftables lässt HTTP nur von 10.0.0.10/32 (CT 103) zu. Discovery (`/.well-known/fluxer`) und exakte upstream-env-Namen gegen die gepinnte compose prüfen (Operator-Schritt, Rolle failt hart bei abweichenden Servicenamen). | ✅ | +| f) **Edge/TLS** | **Machbar — Revision 30.11. (1.14): der Upstream-Caddy läuft als interner Edge.** NPM (CT 103) terminiert TLS (Wildcard `*.ghostnet.selfhost.eu`); der gepinnte Upstream-Caddy horcht auf CT 117 als interner HTTP-Edge auf :8082 (kein ACME, keine public 80/443) und routed laut gepinnter Caddyfile `/api`, `/gateway`, `/media`, `/admin`, `/livekit`, Static-Assets und SPA zu den Compose-Services. Erste Annahme „ohne upstream Caddy" (nur app-proxy 8080) war unvollständig: der app-proxy ist ein reiner SPA-Catch-all, API-Pfade fielen auf ihn zurück. Firewall lässt 8082 nur von 10.0.0.10/32 (CT 103) zu. | ✅ | ## 3. Zielarchitektur ``` Internet ──TLS──> FRITZ!Box (80/443 → CT 103 NPM; optional 7881/tcp, 3478/udp, 50000-50100/udp → CT 117 bei Voice) - CT 103 NPM: fluxer.ghostnet.selfhost.eu → 10.0.0.62:8080 (+ /livekit/ → :7880) + CT 103 NPM: fluxer.ghostnet.selfhost.eu → 10.0.0.62:8082 (alles) CT 117 fluxer (10.0.0.62, Debian 13, unprivileged, nesting=1): nftables default-deny (SSH aus 10.0.0.0/24+10.8.0.0/24, - 8080/7880 nur von 10.0.0.10, Voice-Ports WAN bei D2=ja) + 8082 (caddy edge) nur von 10.0.0.10, Voice-Ports WAN bei D2=ja) fluxer-stack.service → podman compose (pinned, pull_policy=never): - app-proxy:8080, livekit:7880(+media), api, gateway, worker, - media-proxy, static, admin, shards, postgres, valkey, nats, - meilisearch, seaweedfs (caddy edge disabled) + caddy edge :8082 (intern, HTTP) → app-proxy, livekit:7880(+media), + api, gateway, worker, media-proxy, static, admin, shards, + postgres, valkey, nats, meilisearch, seaweedfs Keycloak CT 102: Realm Ghost.net, Client `fluxer` (OIDC-SSO) Pi-hole CT 100: Split-DNS fluxer.ghostnet.selfhost.eu → 10.0.0.10 ``` @@ -98,7 +99,7 @@ ist als Ausbaustufe offen (Abschnitt 11). | Provisioning | `proxmox/lxc/ct-117-fluxer/scripts/provision-ct117-fluxer.sh` | pct create + baseline hook (SHA-256-gepinnt) + configfs-Mask; nie destruktiv | | Ansible | `proxmox/lxc/ct-117-fluxer/ansible/` | `ansible.cfg`, 3 Inventories, `playbooks/{preflight,site}.yml`, Rollen `fluxer_lxc_baseline`, `fluxer_access`, `fluxer_firewall`, `fluxer_stack` + shared `podman_runtime` | | Stack | Rolle `fluxer_stack` | gepinnte upstream-compose (SHA-256, `3b1eb567`/`1cb102f9…`) als separate `docker-compose.upstream.yml`; aktive `docker-compose.yml` wird nur bei Upstream-Änderung aus der Kopie erzeugt und lokal adaptiert (Abschnitt 5a); `docker-compose.ghostnet.yml` (Caddy-Edge aus, nur app-proxy/LiveKit published, `pull_policy: never`, journald) + `.env` (0600, Secrets einmalig on-guest generiert) + `fluxer-stack.service`; Image-Digests gepinnt | -| NPM | `proxmox/lxc/ct-103-reverse-proxy/ansible/roles/reverse_proxy_fluxer_vhost/` | Vhost `fluxer.ghostnet.selfhost.eu` → 10.0.0.62:8080 + `/livekit/` → :7880, LE-Cert, Fail2Ban-Restart; in CT-103-`site.yml` eingehängt | +| NPM | `proxmox/lxc/ct-103-reverse-proxy/ansible/roles/reverse_proxy_fluxer_vhost/` | Vhost `fluxer.ghostnet.selfhost.eu` → 10.0.0.62:8082 (interner Caddy-Edge, alles; WS-Upgrade, 86400 s Timeouts), LE-Cert, Fail2Ban-Restart; in CT-103-`site.yml` eingehängt | | Keycloak | `proxmox/lxc/ct-102-keycloak/.../keycloak_realm_config` | Client `fluxer` (Abschnitt 4) | **Begründete Abweichung vom Quadlet-Schema:** Upstream liefert eine einzige @@ -131,10 +132,11 @@ Loop-Args unzuverlässig): FLUXER_VAPID_EMAIL, FLUXER_PASSKEY_RP_ID, FLUXER_PASSKEY_ADDITIONAL_ALLOWED_ORIGINS) — podman-compose zerpflückt nested defaults und lässt Literale wie `}:` im Container-Env stehen. -3. **`depends_on: caddy` (app-proxy) entfernt** — mit dem per Override-Profil - deaktivierten Caddy-Edge crasht podman-compose mit `KeyError: 'caddy'` - in `check_dep_conditions`; die Override zeigt DISCOVERY_UPSTREAM_URL direkt - auf die api. +3. ~~`depends_on: caddy` (app-proxy) entfernt~~ — **mit 1.14 revertiert:** der + Caddy-Edge läuft wieder (intern, :8082), die Upstream-Dep-Kante bleibt + unverändert. (Historisch: mit per Override-Profil deaktiviertem Edge + crashte podman-compose mit `KeyError: 'caddy'` in `check_dep_conditions`; + die Override zeigt DISCOVERY_UPSTREAM_URL weiterhin direkt auf die api.) Zusätzlich gilt für die `.env`: **jede** in der Compose referenzierte Variable muss explizit stehen — auch die mit leerem Upstream-Default (CSP_*, SMTP-Felder, diff --git a/proxmox/lxc/ct-103-reverse-proxy/ansible/roles/reverse_proxy_fluxer_vhost/defaults/main.yml b/proxmox/lxc/ct-103-reverse-proxy/ansible/roles/reverse_proxy_fluxer_vhost/defaults/main.yml index b1d983e..52aea7a 100644 --- a/proxmox/lxc/ct-103-reverse-proxy/ansible/roles/reverse_proxy_fluxer_vhost/defaults/main.yml +++ b/proxmox/lxc/ct-103-reverse-proxy/ansible/roles/reverse_proxy_fluxer_vhost/defaults/main.yml @@ -13,9 +13,12 @@ reverse_proxy_fluxer_api_env_file: /etc/nginx-proxy-manager/api.env reverse_proxy_fluxer_domain: fluxer.ghostnet.selfhost.eu reverse_proxy_fluxer_upstream_host: 10.0.0.62 -reverse_proxy_fluxer_upstream_port: 8080 +# Internal caddy edge on CT 117 (site32-Befund): the pinned upstream Caddyfile +# routes /api, /gateway, /media, /admin, /livekit, static assets and the SPA +# to the compose services — the app-proxy alone returns SPA HTML for API +# paths. NPM terminates TLS and proxies EVERYTHING to caddy on 8082. +reverse_proxy_fluxer_upstream_port: 8082 reverse_proxy_fluxer_upstream_scheme: http -reverse_proxy_fluxer_livekit_upstream_port: 7880 reverse_proxy_fluxer_letsencrypt_email: ma-koenig@gmx.net # No oauth2-proxy IAP in front of Fluxer: the instance is public like any chat @@ -28,18 +31,6 @@ reverse_proxy_fluxer_letsencrypt_email: ma-koenig@gmx.net # generation). WebSocket upgrade headers for the gateway and LiveKit # signaling; long timeouts for long-lived WS connections. reverse_proxy_fluxer_advanced_config: | - location /livekit/ { - proxy_pass http://{{ reverse_proxy_fluxer_upstream_host }}:{{ reverse_proxy_fluxer_livekit_upstream_port }}; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_read_timeout 86400s; - proxy_send_timeout 86400s; - } location / { proxy_pass http://{{ reverse_proxy_fluxer_upstream_host }}:{{ reverse_proxy_fluxer_upstream_port }}; proxy_set_header Host $host; diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/defaults/main.yml b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/defaults/main.yml index 19c217a..6cb105e 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/defaults/main.yml +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/defaults/main.yml @@ -10,8 +10,10 @@ fluxer_firewall_reverse_proxy_ipv4: 10.0.0.10/32 # 10.89.0.1:53 + inter-container traffic must pass the CT firewall) fluxer_firewall_podman_subnet: 10.89.0.0/16 fluxer_firewall_podman_dns_ip: 10.89.0.1 -fluxer_firewall_app_proxy_port: 8080 -fluxer_firewall_livekit_signaling_port: 7880 +# Internal caddy edge (site32-Befund): the ONLY HTTP port published for NPM; +# the pinned Caddyfile routes /api, /gateway, /media, /admin, /livekit and +# the SPA from there. +fluxer_firewall_edge_port: 8082 # Voice/video media (LiveKit) is published on the CT IP and must be reachable # from the internet; the FRITZ!Box forwards these ports to 10.0.0.62 diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/tasks/main.yml b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/tasks/main.yml index 2ce206b..49179cf 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/tasks/main.yml +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/tasks/main.yml @@ -88,10 +88,10 @@ that: - fluxer_firewall_active_table.stdout is search('policy drop') - fluxer_firewall_active_table.stdout is search('SSH management') - - fluxer_firewall_active_table.stdout is search('Fluxer app-proxy via NPM') + - fluxer_firewall_active_table.stdout is search('Fluxer caddy edge via NPM') - fluxer_firewall_active_table.stdout is search('default input deny') - fluxer_firewall_active_table.stdout is search('CT 117 forwards nothing else') - fluxer_firewall_active_table.stdout is search('podman bridge intra-network') - - fluxer_firewall_active_table.stdout is search('NPM to published Fluxer ports') + - fluxer_firewall_active_table.stdout is search('NPM to the published caddy edge') fail_msg: The active nftables policy does not match the declared CT 117 policy. when: not ansible_check_mode diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/templates/nftables.conf.j2 b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/templates/nftables.conf.j2 index a7ae012..e2a168d 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/templates/nftables.conf.j2 +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_firewall/templates/nftables.conf.j2 @@ -2,8 +2,9 @@ # Managed by Ansible role fluxer_firewall. # CT 117 runs the Fluxer stack behind NPM (CT 103): default-deny input, SSH -# from the management networks only, HTTP/WebSocket from the reverse proxy -# only, LiveKit media ports open to the internet iff voice is enabled. +# from the management networks only, the internal caddy edge (8082) from the +# reverse proxy only, LiveKit media ports open to the internet iff voice is +# enabled. destroy table inet ghostnet_filter table inet ghostnet_filter { @@ -31,8 +32,7 @@ table inet ghostnet_filter { ip saddr @management_ipv4 tcp dport {{ fluxer_firewall_ssh_port }} ct state new counter accept comment "SSH management" - ip saddr @reverse_proxy_ipv4 tcp dport {{ fluxer_firewall_app_proxy_port }} ct state new counter accept comment "Fluxer app-proxy via NPM" - ip saddr @reverse_proxy_ipv4 tcp dport {{ fluxer_firewall_livekit_signaling_port }} ct state new counter accept comment "LiveKit signaling via NPM" + ip saddr @reverse_proxy_ipv4 tcp dport {{ fluxer_firewall_edge_port }} ct state new counter accept comment "Fluxer caddy edge via NPM" {% if fluxer_stack_voice_enabled %} tcp dport {{ fluxer_firewall_livekit_tcp_port }} ct state new counter accept comment "LiveKit ICE TCP (voice)" udp dport {{ fluxer_firewall_livekit_udp_port }} counter accept comment "LiveKit UDP (voice)" @@ -64,7 +64,7 @@ table inet ghostnet_filter { # CONTAINER IP inside the podman subnet (site30-Befund) — the input # rules above never see it. Allow NPM and (voice) WAN traffic to the # DNAT'd container destinations here. - ip saddr @reverse_proxy_ipv4 ip daddr {{ fluxer_firewall_podman_subnet }} tcp dport { {{ fluxer_firewall_app_proxy_port }}, {{ fluxer_firewall_livekit_signaling_port }} } ct state new counter accept comment "NPM to published Fluxer ports (app-proxy, livekit signaling)" + ip saddr @reverse_proxy_ipv4 ip daddr {{ fluxer_firewall_podman_subnet }} tcp dport {{ fluxer_firewall_edge_port }} ct state new counter accept comment "NPM to the published caddy edge" {% if fluxer_stack_voice_enabled %} ip daddr {{ fluxer_firewall_podman_subnet }} tcp dport {{ fluxer_firewall_livekit_tcp_port }} ct state new counter accept comment "LiveKit ICE TCP via DNAT (voice)" ip daddr {{ fluxer_firewall_podman_subnet }} udp dport { {{ fluxer_firewall_livekit_udp_port }}, {{ fluxer_firewall_livekit_turn_udp_port }} } counter accept comment "LiveKit UDP via DNAT (voice)" diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/defaults/main.yml b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/defaults/main.yml index 4f8a7bf..b568489 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/defaults/main.yml +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/defaults/main.yml @@ -40,10 +40,16 @@ fluxer_stack_images: [] fluxer_stack_public_domain: fluxer.ghostnet.selfhost.eu fluxer_stack_public_scheme: https fluxer_stack_public_port: 443 -fluxer_stack_app_proxy_port: 8080 -fluxer_stack_livekit_signaling_port: 7880 +# The upstream Caddy edge runs as the INTERNAL edge on CT 117: NPM (CT 103) +# terminates TLS and proxies everything to caddy on this port; the pinned +# Caddyfile routes /api, /gateway, /media, /admin, static assets, /livekit +# and the SPA to the compose services. The app-proxy alone cannot serve the +# app: its catch-all returns SPA HTML for API paths (site32-Befund, revised +# Befund f). +fluxer_stack_edge_port: 8082 fluxer_stack_voice_enabled: true fluxer_stack_livekit_tcp_port: 7881 +fluxer_stack_livekit_udp_port: 7882 fluxer_stack_livekit_turn_udp_port: 3478 fluxer_stack_livekit_rtp_port_range: 50000-50100 diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml index 3af0305..320a575 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml @@ -108,12 +108,6 @@ replace: '${FLUXER_PASSKEY_RP_ID}' - regexp: '\$\{FLUXER_PASSKEY_ADDITIONAL_ALLOWED_ORIGINS:-\$\{FLUXER_PUBLIC_SCHEME:-https\}://\$\{FLUXER_DOMAIN\}\}' replace: '${FLUXER_PASSKEY_ADDITIONAL_ALLOWED_ORIGINS}' - # 3. app-proxy depends_on caddy; with caddy disabled via the override - # profile, podman-compose 1.3.0 crashes with KeyError: 'caddy' in - # check_dep_conditions (site17-Befund). The override points - # DISCOVERY_UPSTREAM_URL directly at the api, so the edge is dead. - - regexp: '^ caddy: .*condition: service_started.*$' - replace: '' when: not ansible_check_mode notify: - Restart the Fluxer stack diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/docker-compose.ghostnet.yml.j2 b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/docker-compose.ghostnet.yml.j2 index 5a5ed8a..9cb9a20 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/docker-compose.ghostnet.yml.j2 +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/docker-compose.ghostnet.yml.j2 @@ -3,10 +3,16 @@ # - EVERY service gets its digest-pinned image + pull_policy: never + # journald logging (CT 102/103 pinning convention; images are pre-pulled # by the role from fluxer_stack_images); -# - the upstream Caddy edge is disabled (NPM on CT 103 is the TLS edge); -# - only app-proxy (8080) and LiveKit (7880 signaling + media ports) are -# published on the CT IP; the firewall allows 8080/7880 only from CT 103; -# - app-proxy discovery points at the api (caddy edge is disabled). +# - the upstream Caddy edge is ENABLED as the internal edge (HTTP :8082): +# NPM on CT 103 is the TLS edge and proxies everything to caddy, which +# routes /api, /gateway, /media, /admin, static assets, /livekit and the +# SPA to the compose services per the pinned Caddyfile (the app-proxy +# alone returns SPA HTML for API paths, site32-Befund); +# - only the caddy edge (8082) and the LiveKit media ports are published on +# the CT IP; the firewall allows 8082 only from CT 103 (voice media ports +# are WAN-open per GNAI-025 Befund e); +# - app-proxy discovery points at the api (upstream 8088 route is for the +# public-edge Caddy setup). # Service names are asserted against the pinned compose by the role. x-ghostnet-defaults: &ghostnet-defaults pull_policy: never @@ -28,17 +34,13 @@ services: FLUXER_ERLANG_COOKIE: ${FLUXER_ERLANG_COOKIE:?set in .env} {% endif %} {% if svc == fluxer_stack_service_edge %} - profiles: - - ghostnet-disabled-edge - ports: [] + ports: + - "{{ fluxer_stack_edge_port }}:{{ fluxer_stack_edge_port }}" {% elif svc == fluxer_stack_service_app_proxy %} environment: DISCOVERY_UPSTREAM_URL: http://api:8080/api/.well-known/fluxer - ports: - - "{{ fluxer_stack_app_proxy_port }}:{{ fluxer_stack_app_proxy_port }}" {% elif svc == fluxer_stack_service_livekit %} ports: - - "{{ fluxer_stack_livekit_signaling_port }}:7880" - "{{ fluxer_stack_livekit_tcp_port }}:{{ fluxer_stack_livekit_tcp_port }}/tcp" - "{{ fluxer_stack_livekit_udp_port }}:{{ fluxer_stack_livekit_udp_port }}/udp" {% if fluxer_stack_voice_enabled %} diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/fluxer.env.j2 b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/fluxer.env.j2 index dd2c5f4..9dafa96 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/fluxer.env.j2 +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/templates/fluxer.env.j2 @@ -4,8 +4,9 @@ # once on this guest, never in git). Verify the variable names against the # pinned upstream .env.example when bumping fluxer_stack_upstream_commit. FLUXER_DOMAIN={{ fluxer_stack_public_domain }} -# required by the compose even with the caddy edge disabled (GNAI-025): -FLUXER_CADDY_SITE_ADDRESS={{ fluxer_stack_public_scheme }}://{{ fluxer_stack_public_domain }} +# internal caddy edge listener (site32-Befund): NPM is the TLS edge, caddy +# serves plain HTTP on this port only — no ACME, no public 80/443 from here: +FLUXER_CADDY_SITE_ADDRESS=:{{ fluxer_stack_edge_port }} FLUXER_LIVEKIT_ENABLED={{ 'true' if fluxer_stack_voice_enabled else 'false' }} # podman-compose 1.3.0 liefert bei manchen ${VAR:-default}-Refs einen Leerstring # durch (hier beobachtet: SSO_ALLOW_PRIVATE_ADDRESSES) — daher explizit gesetzt: