GNAI-025: Fluxer-Chat-LXC CT 117 — komplett in Betrieb (fluxer.ghostnet.selfhost.eu) #21

Merged
spektr merged 72 commits from lxc/ct-117-gnai-025-fluxer-chat into main 2026-11-30 04:49:27 +01:00
5 changed files with 57 additions and 24 deletions
Showing only changes of commit 33d36a0bc4 - Show all commits
@@ -49,6 +49,33 @@ fluxer_stack_livekit_rtp_port_range: 50000-50100
# asserts each name exists in the pinned compose file and fails with a clear
# message if upstream renamed a service (then adjust here and in the
# override template).
fluxer_stack_service_images: # service -> digest-gepinntes Image (aus pin-fluxer-images.sh @ 3b1eb567)
caddy: "docker.io/library/caddy:2.10-alpine@sha256:4c6e91c6ed0e2fa03efd5b44747b625fec79bc9cd06ac5235a779726618e530d"
postgres: "docker.io/library/postgres:16-alpine@sha256:f2f98726820d0342055351c6e9d36e705f5bfffb3dd53ff556325114b08afb6d"
valkey: "docker.io/valkey/valkey:8.1-alpine@sha256:9971099af41c36e887aabdfe22b80c0fe45df949163dfc9cb434febc57cfc3fc"
nats: "docker.io/library/nats:2.14-alpine@sha256:311da47e2f31c26e99c623cd78d486a1e8ab039c49b32652770bb91a4f70512e"
meilisearch: "docker.io/getmeili/meilisearch:v1.12@sha256:c9fac23131cca4db95173d41cc50fd5639121ee381795528fdd7522d7978a7b8"
seaweedfs: "docker.io/chrislusf/seaweedfs:4.34@sha256:6620371e8af8282056685c652d4637265698c9e2c2d59f9594e6ac333ad6c634"
seaweedfs-init: "docker.io/chrislusf/seaweedfs:4.34@sha256:6620371e8af8282056685c652d4637265698c9e2c2d59f9594e6ac333ad6c634"
livekit: "docker.io/livekit/livekit-server:v1.12.0@sha256:b1281e66e35e8f9749ffbcf0fe6ab4d40d1438aa00f36c2ea7e6975e5e261e2e"
api: "ghcr.io/fluxerapp/fluxer-api:v1@sha256:9d5e0b2cac35435d724e8bb2d0999a278219a811c68b16d6ac455a5d16948b8f"
worker: "ghcr.io/fluxerapp/fluxer-api:v1@sha256:9d5e0b2cac35435d724e8bb2d0999a278219a811c68b16d6ac455a5d16948b8f"
gateway: "ghcr.io/fluxerapp/fluxer-gateway:v1@sha256:462e332783375c13e0044f10177069822eb0f457f966a982f4aa182d1eae9043"
media-proxy: "ghcr.io/fluxerapp/fluxer-media-proxy:v1@sha256:2ff45bbcff172c29a0de45c51505631aba8bd30287c408335921e39a87f14688"
static-proxy: "ghcr.io/fluxerapp/fluxer-static:v1@sha256:bb55869686b23046dbfc7730442e382643dd10b5c34be8fae788f4afc53a8f35"
app-proxy: "ghcr.io/fluxerapp/fluxer-app-proxy-self-hosted:v1@sha256:30cb19c289a2697dd3d80f50ec43da3caab0674fdee96dd24cee7cfbb0e62370"
admin: "ghcr.io/fluxerapp/fluxer-admin:v1@sha256:836be5b66ffa3bd83bffb15061b362b4fac34e898352eadf4a554a2f763c9c11"
snowflakes: "ghcr.io/fluxerapp/fluxer-snowflakes:v1@sha256:a75ab098ba71139ed78a8512523dc7449392dc52e1bf1ec3318f05d4d83c4096"
snowflakes-shard: "ghcr.io/fluxerapp/fluxer-snowflakes:v1@sha256:a75ab098ba71139ed78a8512523dc7449392dc52e1bf1ec3318f05d4d83c4096"
users: "ghcr.io/fluxerapp/fluxer-users:v1@sha256:22c44aff82785ee31d3e94823fb2775b9fab0845e04179c681a5893f685f5555"
users-shard: "ghcr.io/fluxerapp/fluxer-users:v1@sha256:22c44aff82785ee31d3e94823fb2775b9fab0845e04179c681a5893f685f5555"
messages: "ghcr.io/fluxerapp/fluxer-messages:v1@sha256:cbdfd2be58aa654d2e599af02de5c1214f0c2b73855f36edfed096a7f92bcca6"
messages-shard: "ghcr.io/fluxerapp/fluxer-messages:v1@sha256:cbdfd2be58aa654d2e599af02de5c1214f0c2b73855f36edfed096a7f92bcca6"
gifs: "ghcr.io/fluxerapp/fluxer-gifs:v1@sha256:a7916918e7b42a69dc06fb70349cde457d6fe7226a54bc52105e5ae6aa972c03"
gifs-shard: "ghcr.io/fluxerapp/fluxer-gifs:v1@sha256:a7916918e7b42a69dc06fb70349cde457d6fe7226a54bc52105e5ae6aa972c03"
unfurl: "ghcr.io/fluxerapp/fluxer-unfurl:v1@sha256:0b6ba1e741925727fb09525de7ba3eedfba8b7d728f05f0ba58cd5794a8bf14f"
unfurl-shard: "ghcr.io/fluxerapp/fluxer-unfurl:v1@sha256:0b6ba1e741925727fb09525de7ba3eedfba8b7d728f05f0ba58cd5794a8bf14f"
fluxer_stack_service_edge: caddy
fluxer_stack_service_app_proxy: app-proxy
fluxer_stack_service_livekit: livekit
@@ -92,12 +92,18 @@
Upstream compose does not define service '{{ item }}'. Adjust
fluxer_stack_service_* in the inventory/role defaults and the override
template for the pinned upstream commit.
loop:
- "{{ fluxer_stack_service_edge }}"
- "{{ fluxer_stack_service_app_proxy }}"
- "{{ fluxer_stack_service_livekit }}"
loop: "{{ fluxer_stack_service_images.keys() | list }}"
when: not ansible_check_mode
- name: Allow docker.io as unqualified-search registry (upstream compose uses short names)
ansible.builtin.copy:
dest: /etc/containers/registries.conf.d/99-ghostnet-dockerio.conf
content: |
unqualified-search-registries = ["docker.io"]
owner: root
group: root
mode: "0644"
- name: Install the ghostnet compose override
ansible.builtin.template:
src: docker-compose.ghostnet.yml.j2
@@ -1,12 +1,12 @@
# Managed by Ansible role fluxer_stack (GNAI-025).
# Ghostnet override for the pinned upstream compose:
# - the upstream Caddy edge is disabled (NPM on CT 103 terminates TLS and
# proxies to the app-proxy; no 80/443 published on CT 117);
# - only the app-proxy (HTTP/WS) and LiveKit signaling are published, plus
# the LiveKit media ports iff voice is enabled;
# - pull_policy: never on every touched service — images are pre-pulled by
# digest from fluxer_stack_images (CT 102/103 pinning convention);
# - journald logging so `podman logs`/`journalctl` work uniformly.
# Ghostnet override for the pinned upstream compose (@ 3b1eb567):
# - 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).
# Service names are asserted against the pinned compose by the role.
x-ghostnet-defaults: &ghostnet-defaults
pull_policy: never
@@ -14,24 +14,21 @@ x-ghostnet-defaults: &ghostnet-defaults
driver: journald
services:
{{ fluxer_stack_service_edge }}:
{% for svc, image in fluxer_stack_service_images.items() | sort %}
{{ svc }}:
<<: *ghostnet-defaults
image: {{ image }}
{% if svc == fluxer_stack_service_edge %}
profiles:
- ghostnet-disabled-edge
ports: []
{{ fluxer_stack_service_app_proxy }}:
<<: *ghostnet-defaults
{% elif svc == fluxer_stack_service_app_proxy %}
environment:
# upstream points discovery at the disabled caddy edge; the api serves it
DISCOVERY_UPSTREAM_URL: http://api:8080/api/.well-known/fluxer
ports:
- "{{ fluxer_stack_app_proxy_port }}:{{ fluxer_stack_app_proxy_port }}"
{{ fluxer_stack_service_livekit }}:
<<: *ghostnet-defaults
{% elif svc == fluxer_stack_service_livekit %}
ports:
# signaling (NPM /livekit/ -> :7880) + media (WAN via FRITZ!Box)
- "{{ 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"
@@ -39,3 +36,5 @@ services:
- "{{ fluxer_stack_livekit_turn_udp_port }}:{{ fluxer_stack_livekit_turn_udp_port }}/udp"
- "{{ fluxer_stack_livekit_rtp_port_range }}:{{ fluxer_stack_livekit_rtp_port_range }}/udp"
{% endif %}
{% endif %}
{% endfor %}
@@ -14,7 +14,7 @@ RemainAfterExit=yes
WorkingDirectory={{ fluxer_stack_directory }}
ExecStart=/usr/bin/podman-compose --project-name fluxer -f {{ fluxer_stack_compose_file }} -f {{ fluxer_stack_override_file }} up -d
ExecStop=/usr/bin/podman-compose --project-name fluxer -f {{ fluxer_stack_compose_file }} -f {{ fluxer_stack_override_file }} down
TimeoutStartSec=900
TimeoutStartSec=1800
TimeoutStopSec=180
[Install]
@@ -16,8 +16,9 @@ FLUXER_PUBLIC_ORIGIN={{ fluxer_stack_public_scheme }}://{{ fluxer_stack_public_d
FLUXER_PUBLIC_ORIGIN={{ fluxer_stack_public_scheme }}://{{ fluxer_stack_public_domain }}:{{ fluxer_stack_public_port }}
{% endif %}
FLUXER_IMAGE_TAG={{ fluxer_stack_image_tag }}
# FLUXER_REGISTRY / FLUXER_REGISTRY_OWNER bleiben auf den compose-Defaults
# (ghcr.io/fluxerapp) — gesetzt im Pin-Skript, nicht doppelt im .env.
# voll expandiert setzen: podman-compose loest verschachtelte ${VAR:-${VAR2:-..}}
# nicht auf — ohne explizites FLUXER_REGISTRY bleibt der Literal-String stehen
FLUXER_REGISTRY=ghcr.io/fluxerapp
# Internal service endpoints stay on the compose network (service DNS names).
FLUXER_KV_URL=redis://valkey:6379/0