version: '3.5'
services:
  plex:
    container_name: plex
    image: linuxserver/plex
    restart: unless-stopped
    ports:
      - 32444:32400/tcp
      # - 3005:3005/tcp
      # - 8324:8324/tcp
      # - 32469:32469/tcp
      # - 1900:1900/udp
      # - 32410:32410/udp
      # - 32412:32412/udp
      # - 32413:32413/udp
      # - 32414:32414/udp
    environment:
      - PLEX_CLAIM=claim-D3t-C2vfeou5x9zSpvMJ
      - PUID=1000
      - PGID=1000
      - TZ=Australia/Melbourne
      - VERSION=public
      # - ADVERTISE_IP=https://plex.home.toozhao.com
      # - VIRTUAL_PORT=32400
      # - VIRTUAL_HOST=plex.home.toozhao.com
      # - LETSENCRYPT_HOST=plex.home.toozhao.com
      # - LETSENCRYPT_EMAIL=me@toozhao.com
    hostname: Home-Server
    volumes:
      - /mnt/plex:/config
      - /mnt/plex-temp:/transcode
      - /mnt/downloads/sonarr:/data/sonarr
      - /mnt/downloads/radarr:/data/radarr
    # mem_limit: 2048m
    # mem_reservation: 512m
    # cpu_percent: 20
#   tautulli:
#     container_name: tautulli
#     image: tautulli/tautulli
#     restart: unless-stopped
#     # ports:
#     #   - 8181:8181
#     environment:
#       - TZ=Australia/Melbourne
#       - VIRTUAL_PORT=8181
#       - VIRTUAL_HOST=tautulli.home.toozhao.com
#       - LETSENCRYPT_HOST=tautulli.home.toozhao.com
#       - LETSENCRYPT_EMAIL=me@toozhao.com
#     links:
#       - plex
#     volumes:
#       - /mnt/tautulli:/config
#       - "/mnt/plex/Library/Application Support/Plex Media Server/Logs:/plex_logs"
#     networks:
#       - gateway_default
#     mem_limit: 1024m
#     mem_reservation: 256m
#     cpu_percent: 20
#   bazarr:
#     image: linuxserver/bazarr
#     container_name: bazarr
#     restart: unless-stopped
#     # ports:
#     #   - 6767:6767
#     environment:
#       - TZ=Australia/Melbourne
#       - VIRTUAL_PORT=6767
#       - VIRTUAL_HOST=bazarr.home.toozhao.com
#       - LETSENCRYPT_HOST=bazarr.home.toozhao.com
#       - LETSENCRYPT_EMAIL=me@toozhao.com
#     volumes:
#       - /mnt/bazarr:/config
#       - /mnt/downloads:/tv
#       - /mnt/downloads:/movies
#     networks:
#       - gateway_default
# networks:
#   gateway_default:
#     external: true
