networks:
  1panel-network:
    external: true

services:
  clouddrive2:
    image: cloudnas/clouddrive2:0.9.15
    container_name: ${CONTAINER_NAME}
    labels:
      createdBy: "Apps"
    restart: always
    privileged: true
    networks:
      - 1panel-network
    devices:
      - /dev/fuse:/dev/fuse
    cap_add:
      - SYS_ADMIN
    pid: "host"
    ports:
      - ${PANEL_APP_PORT_HTTP}:19798
    env_file:
      - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
      - ${ENV_FILE:-/etc/1panel/envs/default.env}
    volumes:
      - ${CLOUDDRIVE2_ROOT_PATH}/CloudNAS:/CloudNAS:shared
      - ${CLOUDDRIVE2_ROOT_PATH}/Config:/Config
      - ${CLOUDDRIVE2_ROOT_PATH}/media:/media:shared
    environment:
      - TZ=Asia/Shanghai
      - CLOUDDRIVE_HOME=/Config
