From c07c840de40a29f2df60c7bcbd558b676c9c9d1f Mon Sep 17 00:00:00 2001 From: Teck Meng Date: Mon, 10 Jun 2024 14:19:56 +0800 Subject: [PATCH] Refactor swarm/librechat.yml to update traefik rule for librechat service --- swarm/librechat.yml | 2 +- swarm/openwebui.yml | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 swarm/openwebui.yml diff --git a/swarm/librechat.yml b/swarm/librechat.yml index 5cf6227..b09addf 100644 --- a/swarm/librechat.yml +++ b/swarm/librechat.yml @@ -54,7 +54,7 @@ services: - traefik.docker.network=traefik-public - traefik.constraint-label=traefik-public - traefik.http.routers.librechat.entrypoints=https - - traefik.http.routers.librechat.rule=Host(`chat.${DOMAIN}`) || Host(`bot.${DOMAIN}`) + - traefik.http.routers.librechat.rule=Host(`chat.${DOMAIN}`) - traefik.http.routers.librechat.tls.certresolver=le - traefik.http.routers.librechat.service=librechat_app - traefik.http.services.librechat_app.loadbalancer.server.port=${PORT} diff --git a/swarm/openwebui.yml b/swarm/openwebui.yml new file mode 100644 index 0000000..a102d0b --- /dev/null +++ b/swarm/openwebui.yml @@ -0,0 +1,24 @@ +networks: + traefik-public: + external: true + +services: + open-webui: + image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main} + container_name: open-webui + volumes: + - /var/data/open-webui:/app/backend/data + extra_hosts: + - host.docker.internal:host-gateway + networks: + - traefik-public + deploy: + labels: + - traefik.enable=true + - traefik.docker.network=traefik-public + - traefik.constraint-label=traefik-public + - traefik.http.routers.open-webui.entrypoints=https + - traefik.http.routers.open-webui.rule=Host(`bot.${DOMAIN}`) + - traefik.http.routers.open-webui.tls.certresolver=le + - traefik.http.routers.open-webui.service=open-webui + - traefik.http.services.open-webui.loadbalancer.server.port=${OPEN_WEBUI_PORT-8080}