networks:
  1panel-network:
    external: true
services:
  stash:
    container_name: stash
    env_file:
    - ./envs/global.env
    - .env
    environment:
    - STASH_PORT=${PANEL_APP_PORT_HTTP:-9999}
    - TZ=Asia/Shanghai
    - STASH_STASH=/data/
    - STASH_GENERATED=/generated/
    - STASH_METADATA=/metadata/
    - STASH_CACHE=/cache/
    image: stashapp/stash:v0.27.2
    labels:
      createdBy: Apps
    logging:
      driver: json-file
      options:
        max-file: '10'
        max-size: 2m
    network_mode: ${NETWORK_MODE:-host}
    ports:
    - ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
    restart: always
    volumes:
    - /etc/localtime:/etc/localtime
    - ${STASH_ROOT_PATH}/config:/root/.stash
    - ${STASH_ROOT_PATH}/data:/data
    - ${STASH_ROOT_PATH}/metadata:/metadata
    - ${STASH_ROOT_PATH}/cache:/cache
    - ${STASH_ROOT_PATH}/blobs:/blobs
    - ${STASH_ROOT_PATH}/generated:/generated
    - ${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}
