Skip to content

Commit

Permalink
🚥 docs: fixed Traefik web layout (#2305)
Browse files Browse the repository at this point in the history
Fixed Traefik config for broken web rending
  • Loading branch information
ventz authored Apr 4, 2024
1 parent e418edd commit 94950b6
Showing 1 changed file with 47 additions and 44 deletions.
91 changes: 47 additions & 44 deletions docs/deployment/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 94950b6

Please sign in to comment.