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