- Modifié
Salut, j'ai mis ma seedbox récemment avec Docker et Docker-Compose, j'utilise Traefik pour le reverse proxy. J'ai en tout 3 containers: traefik, emby, rutorrent accessibles normalement sur des sous-domaines.
Voici mon docker-compose:
version: '3'
services:
traefik:
hostname: traefik
image: traefik:latest
container_name: traefik
restart: always
domainname: ${DOMAINNAME}
networks:
- default
- traefik_proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- CF_API_EMAIL=${CF_API_EMAIL}
- CF_API_KEY=${CF_API_KEY}
labels:
- "traefik.enable=true"
- "traefik.backend=traefik"
- "traefik.frontend.rule=Host:traefik.${DOMAINNAME}"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.com"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
- "traefik.frontend.auth.basic.users=${HTTP_USERNAME}:${HTTP_PASSWORD}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${USERDIR}/docker/traefik:/etc/traefik
- ${USERDIR}/docker/shared:/shared
emby:
hostname: emby
image: emby/embyserver:latest
container_name: emby
restart: always
networks:
- default
- traefik_proxy
ports:
- 8096:8096
environment:
- UID=${PUID}
- GID=${PGID}
volumes:
- ${USERDIR}/docker/emby:/config
- /srv/seedbox/Movies:/mnt/Movies
- /srv/seedbox/Series:/mnt/Series
labels:
- "traefik.enable=true"
- "traefik.backend=emby"
- "traefik.frontend.rule=Host:emby.${DOMAINNAME}"
- "traefik.port=8096"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.com"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
rutorrent:
hostname: rutorrent
image: linuxserver/rutorrent:latest
container_name: rutorrent
restart: unless-stopped
networks:
- default
- traefik_proxy
environment:
- PUID=${PUID}
- PGID=${PGID}
ports:
- 8000:80
- 5000:5000
- 51413:51413
- 6881:6881/udp
volumes:
- ${USERDIR}/docker/rutorrent:/config
- /srv/seedbox:/downloads
labels:
- "traefik.enable=true"
- "traefik.backend=rutorrent"
- "traefik.frontend.rule=Host:torrent.${DOMAINNAME}"
- "traefik.port=8000"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.com"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
- "traefik.frontend.auth.basic.users=${HTTP_USERNAME}:${HTTP_PASSWORD}"
networks:
traefik_proxy:
external:
name: traefik_proxy
default:
driver: bridge
traefik.domaine.com et emby.domaine.com sont accessibles normalement mais torrent.domaine.com renvoie un Bad Gateway même si il est accessible sur son port domaine.com:8000