name: emby networks: traefik-net: external: true services: emby: image: lscr.io/linuxserver/emby:latest hostname: "${APPLICATION_NAME}" env_file: .emby.env group_add: - "${MEDIA_GID}" # not really needed if we have it as the primary gid restart: unless-stopped # this deploy section requires the installation of the nvidia-container-toolkit; comment out if the toolkit is not installed deploy: resources: reservations: devices: - driver: nvidia #count: 1 device_ids: - "${GPU_DEVICE_ID}" capabilities: [gpu] volumes: - /etc/localtime:/etc/localtime:ro - ${DATADIR}/config:/config - ${MEDIADIR}:${CT_MEDIA} networks: - traefik-net labels: - traefik.enable=true - traefik.docker.network=traefik-net # # http services # ------------- - "traefik.http.services.${APPLICATION_NAME}-svc.loadbalancer.server.port=${WEBUI_PORT}" # # http routers # ------------ # limit router to web ":80" entrypoint - "traefik.http.routers.${APPLICATION_NAME}-rtr.entrypoints=web" # set match criteria for router - "traefik.http.routers.${APPLICATION_NAME}-rtr.rule=Host(`${APPLICATION_NAME}.${DOMAINNAME}`)&& PathPrefix(`/`)" # attach middlewares to router - "traefik.http.routers.${APPLICATION_NAME}-rtr.middlewares=http-mw-rateLimit-secureHeaders-redirect@file" # assign svc target to router - "traefik.http.routers.${APPLICATION_NAME}-rtr.service=${APPLICATION_NAME}-svc" # # limit router to websecure ":443" entrypoint - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.entrypoints=websecure" # set match criteria for router - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.rule=Host(`${APPLICATION_NAME}.${DOMAINNAME}`)&& PathPrefix(`/`)" # attach middlewares to router - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.middlewares=http-mw-rateLimit-secureHeaders@file" # tls - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls=true" # apply tls options - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls.options=tls-options@file" # generate certificates using following certresolver - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls.certresolver=solver-dns" # assign svc target to router - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.service=${APPLICATION_NAME}-svc"