Traefik
Traefik setup to run on subdomain.
- Needs an
.env
file withDOMAIN
set, likeDOMAIN=something.local
- Expects an externally created network called
proxy
- Expects two
entryPoints
:http
going to:80
andhttps
going to:443
- Expects a
certificateResolver
calledletsencrypt
Your config may be different so change accordingly.
Subdomain
docker-compose.yml
version: "3.7"
networks:
proxy:
external: true
services:
autobrr:
image: ghcr.io/autobrr/autobrr:latest
container_name: autobrr
restart: unless-stopped
networks:
- proxy
volumes:
- ./data:/config
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.middlewares.redirect-https.redirectScheme.scheme=https"
- "traefik.http.middlewares.redirect-https.redirectScheme.permanent=true"
- "traefik.http.routers.autobrr-https.rule=Host(`autobrr.$DOMAIN`)"
- "traefik.http.routers.autobrr-https.entrypoints=https"
- "traefik.http.routers.autobrr-https.tls=true"
- "traefik.http.routers.autobrr-https.tls.certresolver=letsencrypt"
- "traefik.http.routers.autobrr-https.service=autobrr"
- "traefik.http.routers.autobrr-http.rule=Host(`autobrr.$DOMAIN`)"
- "traefik.http.routers.autobrr-http.entrypoints=http"
- "traefik.http.routers.autobrr-http.middlewares=redirect-https"
- "traefik.http.routers.autobrr-http.service=autobrr"
- "traefik.http.services.autobrr.loadbalancer.server.port=7474"
Subfolder
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.middlewares.autobrr-strip.stripprefix.prefixes=/autobrr"
- "traefik.http.middlewares.autobrr-strip.stripprefix.forceSlash=true"
- "traefik.http.routers.autobrr-baseurl.rule=Host(`full.domain.com`) && PathPrefix(`/autobrr`)"
- "traefik.http.routers.autobrr-baseurl.middlewares=autobrr-strip"
- "traefik.http.routers.autobrr-baseurl.entrypoints=https"
- "traefik.http.routers.autobrr-baseurl.tls=true"
- "traefik.http.routers.autobrr-baseurl.tls.certresolver=letsencrypt"
- "traefik.http.routers.autobrr-baseurl.service=autobrr-baseurl"
- "traefik.http.services.autobrr-baseurl.loadbalancer.server.port=7474"