version: "3.9"

services:
  onlyoffice-documentserver:
    image: onlyoffice/documentserver:9.3.1
    container_name: mnote-onlyoffice-documentserver
    restart: unless-stopped
    ports:
      - "8082:80"
    environment:
      JWT_ENABLED: "true"
      JWT_SECRET: "change-me-to-strong-secret"
      JWT_HEADER: "Authorization"
      JWT_IN_BODY: "true"
      USE_UNAUTHORIZED_STORAGE: "true"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      # 说明：只挂插件目录，不覆盖 DocumentServer 自带 web-apps，避免升级后静态资源被旧版本文件覆盖。
      - ../../src/components/onlyoffice/onlyoffice-plugins:/var/www/onlyoffice/documentserver/sdkjs-plugins:ro
