From 457d75e15e94673ab57925b5b65d4f9f2c5becf5 Mon Sep 17 00:00:00 2001 From: Ventz Petkov <901168+ventz@users.noreply.github.com> Date: Wed, 3 Apr 2024 20:39:42 -0400 Subject: [PATCH] Fixed Traefik config for broken web rending Fixed Traefik config for broken web rending --- docs/deployment/traefik.md | 91 ++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/docs/deployment/traefik.md b/docs/deployment/traefik.md index cf8dbbe1adb..86390936ebb 100644 --- a/docs/deployment/traefik.md +++ b/docs/deployment/traefik.md @@ -25,50 +25,53 @@ weight: 10 In your docker-compose.override.yml file, add the following configuration: - ```yaml - version: '3' - - services: - api: - labels: - - "traefik.enable=true" - - "traefik.http.routers.librechat.rule=Host(`your.domain.name`)" - - "traefik.http.routers.librechat.entrypoints=websecure" - - "traefik.http.routers.librechat.tls.certresolver=leresolver" - - "traefik.http.services.librechat.loadbalancer.server.port=3080" - networks: - - web - - librechat_default - volumes: - - ./librechat.yaml:/app/librechat.yaml - -traefik: - image: traefik:v2.9 - ports: - - "80:80" - - "443:443" - volumes: - - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "./letsencrypt:/letsencrypt" - networks: - - web - command: - - "--log.level=DEBUG" - - "--api.insecure=true" - - "--providers.docker=true" - - "--providers.docker.exposedbydefault=false" - - "--entrypoints.web.address=:80" - - "--entrypoints.websecure.address=:443" - - "--certificatesresolvers.leresolver.acme.tlschallenge=true" - - "--certificatesresolvers.leresolver.acme.email=your@email.com" - - "--certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json" - - networks: - web: - external: true - librechat_default: - external: true - ``` +```yaml +version: '3' + +services: + api: + labels: + - "traefik.enable=true" + - "traefik.http.routers.librechat.rule=Host(`your.domain.name`)" + - "traefik.http.routers.librechat.entrypoints=websecure" + - "traefik.http.routers.librechat.tls.certresolver=leresolver" + - "traefik.http.services.librechat.loadbalancer.server.port=3080" + networks: + - web + - librechat_default + volumes: + - ./librechat.yaml:/app/librechat.yaml + + traefik: + image: traefik:v2.9 + ports: + - "80:80" + - "443:443" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" + - "./letsencrypt:/letsencrypt" + networks: + - web + command: + - "--log.level=DEBUG" + - "--api.insecure=true" + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + - "--entrypoints.web.address=:80" + - "--entrypoints.websecure.address=:443" + - "--certificatesresolvers.leresolver.acme.tlschallenge=true" + - "--certificatesresolvers.leresolver.acme.email=your@email.com" + - "--certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json" + +# other configs here # + +# NOTE: This needs to be at the bottom of your docker-compose.override.yml +networks: + web: + external: true + librechat_default: + external: true +``` Replace `your@email.com` with your email address for Let's Encrypt certificate notifications.