networks:
  1panel-network:
    external: true
services:
  plex:
    container_name: plex
    env_file:
    - ./envs/global.env
    - .env
    environment:
    - NVIDIA_VISIBLE_DEVICES=all
    - PUID=1000
    - PGID=1000
    - UMASK=022
    - TZ=Asia/Shanghai
    - VERSION=docker
    image: linuxserver/plex:1.41.3
    labels:
      createdBy: Apps
    network_mode: ${NETWORK_MODE}
    ports:
    - ${PANEL_APP_PORT_HTTP}:32400
    restart: always
    volumes:
    - ${PLEX_ROOT_PATH}/config:/config
    - ${PLEX_ROOT_PATH}/tv:/tv
    - ${PLEX_ROOT_PATH}/movies:/movies
    - ${CUSTOM_MOUNT_DIRECTORY_1:-./default_mount_1}:${CUSTOM_MOUNT_DIRECTORY_1:-/default_mount_1}
    - ${CUSTOM_MOUNT_DIRECTORY_2:-./default_mount_2}:${CUSTOM_MOUNT_DIRECTORY_2:-/default_mount_2}
    - ${CUSTOM_MOUNT_DIRECTORY_3:-./default_mount_3}:${CUSTOM_MOUNT_DIRECTORY_3:-/default_mount_3}
