# Stirling PDF - PDF tools
# Port: 8080
# PDF manipulation toolkit

services:
  stirling-pdf:
    container_name: Stirling-PDF
    image: docker.stirlingpdf.com/stirlingtools/stirling-pdf
    mem_limit: 4g
    cpu_shares: 1024
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/8080' || exit 1
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 90s
    ports:
      - 7890:8080
    volumes:
      - /volume1/docker/stirling/data:/usr/share/tessdata:rw # Required for extra OCR languages
      - /volume1/docker/stirling/config:/configs:rw
      - /volume1/docker/stirling/logs:/logs:rw
      - /volume1/docker/stirling/customfiles:/customFiles:rw
      - /volume1/docker/stirling/pipeline:/pipeline:rw
    environment:
      PUID: 1026
      PGID: 100
      DISABLE_ADDITIONAL_FEATURES: false
      SECURITY_ENABLE_LOGIN: true #or false
      SECURITY_INITIAL_LOGIN_USERNAME: vish
      SECURITY_INITIAL_LOGIN_PASSWORD: "REDACTED_PASSWORD"  # pragma: allowlist secret
      INSTALL_BOOK_AND_ADVANCED_HTML_OPS: false #or true
      SECURITY_CSRFDISABLED: true #or false
      SYSTEM_DEFAULTLOCALE: en-US # or fr-FR or de-DE
      UI_APPNAME: vishPDF
      UI_HOMEDESCRIPTION: vishPDF site
      UI_APPNAMENAVBAR: vish PDF
      SYSTEM_MAXFILESIZE: 5000 # Set the maximum file size in MB
      METRICS_ENABLED: true
      DISABLE_PIXEL: true
      SYSTEM_GOOGLEVISIBILITY: false # or true
    restart: on-failure:5
