From 94ad4ddbd8f8977dd7be4e2572b8fd3202adc6f4 Mon Sep 17 00:00:00 2001 From: R4di04kt1v3 Date: Tue, 23 Sep 2025 19:26:24 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20para=20uso=20de=20Conduit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inteligencia artificial/OpenWebUI/.env | 12 +++++++++ Inteligencia artificial/OpenWebUI/Caddyfile | 26 +++++++++++++++++++ .../OpenWebUI/docker-compose.yml | 9 +++++-- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 Inteligencia artificial/OpenWebUI/.env create mode 100644 Inteligencia artificial/OpenWebUI/Caddyfile diff --git a/Inteligencia artificial/OpenWebUI/.env b/Inteligencia artificial/OpenWebUI/.env new file mode 100644 index 0000000..19f8f49 --- /dev/null +++ b/Inteligencia artificial/OpenWebUI/.env @@ -0,0 +1,12 @@ +# --- Configuración OIDC / Authentik --- +OAUTH_CLIENT_ID=demo_client_id +OAUTH_CLIENT_SECRET=demo_client_secret +OAUTH_PROVIDER_NAME=authentik +OPENID_PROVIDER_URL=https://sso.example.org/application/o/open-web-ui/.well-known/openid-configuration +OPENID_REDIRECT_URI=https://openwebui.example.org/oauth/oidc/callback + +# --- Configuración de la WebUI --- +WEBUI_URL=https://openwebui.example.org +ENABLE_OAUTH_SIGNUP=true +ENABLE_LOGIN_FORM=false +OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true diff --git a/Inteligencia artificial/OpenWebUI/Caddyfile b/Inteligencia artificial/OpenWebUI/Caddyfile new file mode 100644 index 0000000..96bf853 --- /dev/null +++ b/Inteligencia artificial/OpenWebUI/Caddyfile @@ -0,0 +1,26 @@ +# OpenWebUI +openwebui.example.org { + import tls_estricto + import seguridad_basica + import log_json_global + import healthz_path http://10.10.10.20:2960 / + + @conduit_combined { + header X-App-Token TuTokenSecreto + path /api/* /ws* + } + + route { + handle @conduit_combined { + reverse_proxy http://10.10.10.20:2960 { + import ip_headers + } + } + + handle { + reverse_proxy http://10.10.10.20:2960 { + import ip_headers + } + } + } +} diff --git a/Inteligencia artificial/OpenWebUI/docker-compose.yml b/Inteligencia artificial/OpenWebUI/docker-compose.yml index 1e34997..4f0052b 100644 --- a/Inteligencia artificial/OpenWebUI/docker-compose.yml +++ b/Inteligencia artificial/OpenWebUI/docker-compose.yml @@ -2,9 +2,14 @@ services: open-webui: image: ghcr.io/open-webui/open-webui:main container_name: OpenWebUI - network_mode: bridge restart: unless-stopped ports: - "2960:8080" + env_file: + - .env volumes: - - /home/TU-USUARIO/Docker/OpenWebUI/data:/app/backend/data #Adecua correctamente tu ruta \ No newline at end of file + - /opt/docker/OpenWebUI/data:/app/backend/data + +networks: + default: + name: OpenWebUI_NET