KI-AGENT: Matrix durch nativen FEDEO-Chat ersetzen

This commit is contained in:
2026-09-08 22:42:40 +02:00
parent 47bd8e80e4
commit 358e40d749
47 changed files with 1027 additions and 9766 deletions

View File

@@ -235,7 +235,7 @@ choose_mode() {
echo
echo "Setup-Modus"
echo " 1) einfach - Domain, Admin, lokale Datenbank, MinIO, Matrix"
echo " 1) einfach - Domain, Admin, lokale Datenbank und MinIO"
echo " 2) advanced - zusätzlich SMTP, externe Schlüssel und optionale Dienste"
echo
@@ -266,12 +266,10 @@ FEDEO Selfhost Setup
Dieses Script führt dich durch die lokale Betriebsstruktur:
$ROOT_DIR/
$(basename "$COMPOSE_FILE") Docker Stack für FEDEO, Traefik, PostgreSQL, MinIO, Matrix und Monitoring
$(basename "$COMPOSE_FILE") Docker Stack für FEDEO, Traefik, PostgreSQL, MinIO und Monitoring
.env Zielkonfiguration, wird von diesem Script geschrieben
postgres/ persistente FEDEO-Datenbank
minio/ lokaler S3-kompatibler Dateispeicher
matrix/postgres/ persistente Synapse-Datenbank
matrix/synapse/ generierte Synapse-Konfiguration und Matrix-Daten
traefik/letsencrypt/ Let's-Encrypt-Zertifikate
traefik/logs/ Traefik-Logs
@@ -279,11 +277,6 @@ Dieses Script führt dich durch die lokale Betriebsstruktur:
https://DOMAIN/ FEDEO Frontend
https://DOMAIN/backend FEDEO API
https://DOMAIN/_matrix Matrix Homeserver
https://DOMAIN/.well-known Matrix Discovery
https://DOMAIN/livekit/sfu LiveKit
https://DOMAIN/livekit/jwt LiveKit JWT-Service
https://DOMAIN/element Element Web
EOF
}
@@ -303,32 +296,28 @@ write_env() {
local admin_last_name="${12}"
local tenant_name="${13}"
local tenant_short="${14}"
local matrix_db_password="${15}"
local matrix_turn_secret="${16}"
local matrix_registration_secret="${17}"
local livekit_secret="${18}"
local mailer_host="${19}"
local mailer_port="${20}"
local mailer_ssl="${21}"
local mailer_user="${22}"
local mailer_pass="${23}"
local mailer_from="${24}"
local web_push_public="${25}"
local web_push_private="${26}"
local pdf_license="${27}"
local openai_key="${28}"
local stirling_key="${29}"
local gocardless_secret_id="${30}"
local gocardless_secret_key="${31}"
local dokubox_host="${32}"
local dokubox_port="${33}"
local dokubox_secure="${34}"
local dokubox_user="${35}"
local dokubox_password="${36}"
local central_services_enabled="${37}"
local central_services_url="${38}"
local central_instance_id="${39}"
local central_instance_secret="${40}"
local mailer_host="${15}"
local mailer_port="${16}"
local mailer_ssl="${17}"
local mailer_user="${18}"
local mailer_pass="${19}"
local mailer_from="${20}"
local web_push_public="${21}"
local web_push_private="${22}"
local pdf_license="${23}"
local openai_key="${24}"
local stirling_key="${25}"
local gocardless_secret_id="${26}"
local gocardless_secret_key="${27}"
local dokubox_host="${28}"
local dokubox_port="${29}"
local dokubox_secure="${30}"
local dokubox_user="${31}"
local dokubox_password="${32}"
local central_services_enabled="${33}"
local central_services_url="${34}"
local central_instance_id="${35}"
local central_instance_secret="${36}"
cat >"$ENV_FILE" <<EOF
# FEDEO Selfhosting
@@ -401,22 +390,6 @@ FEDEO_BOOTSTRAP_ADMIN_FIRST_NAME=$(env_quote "$admin_first_name")
FEDEO_BOOTSTRAP_ADMIN_LAST_NAME=$(env_quote "$admin_last_name")
FEDEO_BOOTSTRAP_TENANT_NAME=$(env_quote "$tenant_name")
FEDEO_BOOTSTRAP_TENANT_SHORT=$(env_quote "$tenant_short")
FEDEO_BOOTSTRAP_MATRIX=$(env_quote "true")
MATRIX_SERVER_NAME=$(env_quote "$domain")
MATRIX_POSTGRES_DB=$(env_quote "synapse")
MATRIX_POSTGRES_USER=$(env_quote "synapse")
MATRIX_POSTGRES_PASSWORD=$(env_quote "$matrix_db_password")
MATRIX_TURN_SHARED_SECRET=$(env_quote "$matrix_turn_secret")
LIVEKIT_KEY=$(env_quote "fedeo-livekit")
LIVEKIT_SECRET=$(env_quote "$livekit_secret")
MATRIX_HOMESERVER_URL=$(env_quote "http://matrix-synapse:8008")
MATRIX_RTC_HOST=$(env_quote "$domain")
MATRIX_RTC_JWT_URL=$(env_quote "https://$domain/livekit/jwt")
MATRIX_LIVEKIT_URL=$(env_quote "wss://$domain/livekit/sfu")
MATRIX_REGISTRATION_SHARED_SECRET=$(env_quote "$matrix_registration_secret")
MATRIX_SERVICE_USER_LOCALPART=$(env_quote "fedeo_service")
NUXT_PUBLIC_MATRIX_ELEMENT_URL=$(env_quote "https://$domain/element")
EOF
}
@@ -425,9 +398,7 @@ prepare_directories() {
"$ROOT_DIR/traefik/letsencrypt" \
"$ROOT_DIR/traefik/logs" \
"$ROOT_DIR/postgres" \
"$ROOT_DIR/minio" \
"$ROOT_DIR/matrix/postgres" \
"$ROOT_DIR/matrix/synapse"
"$ROOT_DIR/minio"
touch "$ROOT_DIR/traefik/letsencrypt/acme.json"
chmod 600 "$ROOT_DIR/traefik/letsencrypt/acme.json"
@@ -466,13 +437,11 @@ uninstall_stack() {
fi
echo
echo "Achtung: --purge entfernt lokale Datenbanken, Dateien, Matrix-Daten, Zertifikate und .env."
echo "Achtung: --purge entfernt lokale Datenbanken, Dateien, Zertifikate und .env."
echo "Betroffene Pfade:"
echo " $ENV_FILE"
echo " $ROOT_DIR/postgres"
echo " $ROOT_DIR/minio"
echo " $ROOT_DIR/matrix/postgres"
echo " $ROOT_DIR/matrix/synapse"
echo " $ROOT_DIR/traefik/letsencrypt"
echo " $ROOT_DIR/traefik/logs"
@@ -487,8 +456,6 @@ uninstall_stack() {
"$ENV_FILE" \
"$ROOT_DIR/postgres" \
"$ROOT_DIR/minio" \
"$ROOT_DIR/matrix/postgres" \
"$ROOT_DIR/matrix/synapse" \
"$ROOT_DIR/traefik/letsencrypt" \
"$ROOT_DIR/traefik/logs"
@@ -539,17 +506,12 @@ main() {
echo
echo "Secrets werden automatisch erzeugt."
local db_password minio_password cookie_secret jwt_secret encryption_key m2m_key
local matrix_db_password matrix_turn_secret matrix_registration_secret livekit_secret
db_password="$(random_hex_secret)"
minio_password="$(random_secret)"
cookie_secret="$(random_secret)"
jwt_secret="$(random_secret)"
encryption_key="$(random_hex_secret)"
m2m_key="$(random_secret)"
matrix_db_password="$(random_secret)"
matrix_turn_secret="$(random_secret)"
matrix_registration_secret="$(random_secret)"
livekit_secret="$(random_secret)"
local mailer_host="smtp.example.com"
local mailer_port="587"
@@ -613,8 +575,7 @@ main() {
"$domain" "$contact_email" "$db_password" "$minio_password" \
"$cookie_secret" "$jwt_secret" "$encryption_key" "$m2m_key" \
"$admin_email" "$admin_password" "$admin_first_name" "$admin_last_name" \
"$tenant_name" "$tenant_short" "$matrix_db_password" "$matrix_turn_secret" \
"$matrix_registration_secret" "$livekit_secret" "$mailer_host" "$mailer_port" \
"$tenant_name" "$tenant_short" "$mailer_host" "$mailer_port" \
"$mailer_ssl" "$mailer_user" "$mailer_pass" "$mailer_from" "$web_push_public" \
"$web_push_private" "$pdf_license" "$openai_key" "$stirling_key" \
"$gocardless_secret_id" "$gocardless_secret_key" "$dokubox_host" \