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.