services:

  thumbnail-server:
    image: ${THUMBNAIL_SERVER_IMAGE:-seafileltd/thumbnail-server:13.0-latest}
    container_name: thumbnail-server
    restart: always
    volumes:
      - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
    ports:
      - "80:80"
    environment:
      - TIME_ZONE=${TIME_ZONE:-Etc/UTC}
      - SEAFILE_MYSQL_DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
      - SEAFILE_MYSQL_DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
      - SEAFILE_MYSQL_DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
      - SEAFILE_MYSQL_DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
      - SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db}
      - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
      - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
      - SITE_ROOT=${SITE_ROOT:-/}
      - INNER_SEAHUB_SERVICE_URL=${INNER_SEAHUB_SERVICE_URL:?Variable is not set or empty}
      - SEAF_SERVER_STORAGE_TYPE=${SEAF_SERVER_STORAGE_TYPE:-}
      - S3_COMMIT_BUCKET=${S3_COMMIT_BUCKET:-}
      - S3_FS_BUCKET=${S3_FS_BUCKET:-}
      - S3_BLOCK_BUCKET=${S3_BLOCK_BUCKET:-}
      - S3_KEY_ID=${S3_KEY_ID:-}
      - S3_SECRET_KEY=${S3_SECRET_KEY:-}
      - S3_USE_V4_SIGNATURE=${S3_USE_V4_SIGNATURE:-true}
      - S3_AWS_REGION=${S3_AWS_REGION:-us-east-1}
      - S3_HOST=${S3_HOST:-}
      - S3_USE_HTTPS=${S3_USE_HTTPS:-true}
      - S3_PATH_STYLE_REQUEST=${S3_PATH_STYLE_REQUEST:-false}
      - S3_SSE_C_KEY=${S3_SSE_C_KEY:-}
    networks:
      - seafile-net

networks:
  seafile-net:
    name: seafile-net
