services:
  onlyoffice:
    image: onlyoffice/documentserver:8.2
    restart: unless-stopped
    environment:
      - JWT_ENABLED=true
      - JWT_SECRET=${ONLYOFFICE_JWT_SECRET:-changeme-onlyoffice-jwt}
      - JWT_HEADER=Authorization
      - JWT_IN_BODY=true
      # ultid/nginx URLs in editor config resolve to Docker private IPs
      - ALLOW_PRIVATE_IP_ADDRESS=true
      - ALLOW_META_IP_ADDRESS=true
    networks:
      - ulti-net
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://127.0.0.1/healthcheck >/dev/null || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 90s
