60 lines
2.3 KiB
YAML
60 lines
2.3 KiB
YAML
|
|
name: jellyfin
|
|
|
|
networks:
|
|
traefik-net:
|
|
external: true
|
|
macvlan1:
|
|
external: true
|
|
|
|
services:
|
|
jellyfin:
|
|
image: lscr.io/linuxserver/jellyfin:latest
|
|
hostname: ${APPLICATION_NAME}
|
|
env_file: .jellyfin.env
|
|
restart: unless-stopped
|
|
networks:
|
|
traefik-net:
|
|
# macvlan1:
|
|
# ipv4_address: ${JELLYFIN_LOCAL}
|
|
# 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-b9bf37c1-f8c9-201c-3456-0aa35381be42"
|
|
capabilities: [gpu]
|
|
volumes:
|
|
- "${DATADIR}/config:/config"
|
|
- "${DATADIR}/transcodes:/config/data/transcodes"
|
|
- "${MEDIADIR}:/data"
|
|
# depends_on:
|
|
# - avahi-tools
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.docker.network=traefik-net
|
|
|
|
- "traefik.http.services.${APPLICATION_NAME}-svc.loadbalancer.server.port=${SERVICE_PORT}"
|
|
|
|
- "traefik.http.routers.${APPLICATION_NAME}-rtr.entrypoints=web"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-rtr.rule=Host(`${APPLICATION_NAME}.${DOMAINNAME}`)"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-rtr.middlewares=http-mw-secureHeaders-redirect@file"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-rtr.service=${APPLICATION_NAME}-svc"
|
|
|
|
- "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.entrypoints=websecure"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.rule=Host(`${APPLICATION_NAME}.${DOMAINNAME}`)"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.middlewares=http-mw-secureHeaders@file"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls=true"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls.options=tls-options@file"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls.certresolver=solver-dns"
|
|
- "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.service=${APPLICATION_NAME}-svc"
|
|
# avahi-tools:
|
|
# volumes:
|
|
# - /run/dbus:/var/run/dbus
|
|
# - /run/avahi-daemon:/var/run/avahi-daemon
|
|
# image: ahasbini/avahi-tools:latest
|
|
# #command: avahi-publish -a jellyfin.local ${JELLYFIN_LOCAL}
|
|
# command: avahi-publish-service -s jellyfin.local _http._tcp 8096 "Jellyfin" "Jellyfin Media Server" |