version: "2"

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    # network_mode: host
    hostname: jellyfin
    restart: unless-stopped
    ports:
      - "8096:8096"
    environment:
      PUID: 1001
      PGID: 1001
      TZ: Europe/Copenhagen
    volumes:
      - /srv/jellyfin/config:/config
      - /srv/jellyfin/config/cache:/cache
      - /home/null/shares/disk1:/media
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.jelly.tls=true"
      - "traefik.http.routers.jelly.entrypoints=websecure"
      - "traefik.http.routers.jelly.rule=Host(`jelly.$DOMAIN_NAME`)"
      - "traefik.http.routers.jelly.tls.certresolver=letsencr"
      - "traefik.http.services.jelly.loadbalancer.server.port=8096"
      - traefik.docker.network=traefik
    # logging:
    #   driver: loki
    #   options:
    #       loki-url: "http://localhost:3100/loki/api/v1/push"

networks:
  default:
    external:
      name: $DEFAULT_NETWORK