Refactor traefik.yml to fix routing rules for chat and bot subdomains

This commit is contained in:
2024-05-30 19:22:36 +08:00
parent 0bb60245dc
commit 63b190ccbd
2 changed files with 23 additions and 15 deletions
+10 -2
View File
@@ -9,8 +9,8 @@ volumes:
meili_data:
services:
api:
container_name: LibreChat
librechat_api:
container_name: librechat_api
ports:
- "${PORT}:${PORT}"
depends_on:
@@ -36,6 +36,14 @@ services:
- type: bind
source: ./config/librechat.yaml
target: /app/librechat.yaml
labels:
- "traefik.enable=true"
- "traefik.http.routers.librechat.entrypoints=web-secure"
- "traefik.http.routers.librechat.rule=Host(`chat.${DOMAINNAME}`) || Host(`bot.${DOMAINNAME}`)"
- "traefik.http.routes.librechat.middlewares=csrf@file"
- "traefik.http.routers.librechat.tls.certresolver=letsencrypt"
- "traefik.http.routers.librechat.service=librechat_app"
- "traefik.http.services.librechat_app.loadbalancer.server.port=${PORT}"
mongodb:
container_name: chat-mongodb
image: mongo
+13 -13
View File
@@ -95,15 +95,15 @@ http:
routers:
chat-router:
entryPoints:
- web-secure
rule: "Host(`bot.furyhawk.lol`) || Host(`chat.furyhawk.lol`)"
middlewares:
- csrf
tls:
certResolver: letsencrypt
service: librechat_app
# chat-router:
# entryPoints:
# - web-secure
# rule: "Host(`bot.furyhawk.lol`) || Host(`chat.furyhawk.lol`)"
# middlewares:
# - csrf
# tls:
# certResolver: letsencrypt
# service: librechat_app
# forum-router:
# entryPoints:
@@ -258,10 +258,10 @@ http:
# loadBalancer:
# servers:
# - url: http://kestra:8080
librechat_app:
loadBalancer:
servers:
- url: http://LibreChat:3080
# librechat_app:
# loadBalancer:
# servers:
# - url: http://LibreChat:3080
# neo4j-bolt:
# loadBalancer:
# servers: