version: "3.4"
services:
  broker:
    image: redis:6
    restart: unless-stopped
    volumes:
      - redisdata:/data
    networks:
      - paperless

  webserver:
    image: ghcr.io/paperless-ngx/paperless-ngx:latest
    restart: unless-stopped
    depends_on:
      - broker
    ports:
      - "8001:8000"
    volumes:
      - ./data:/usr/src/paperless/data:rw
      - /mnt/pdfs/media:/usr/src/paperless/media:rw
      - /mnt/pdfs/consume:/usr/src/paperless/consume:rw
      - /mnt/pdfs/export:/usr/src/paperless/export:rw

    environment:
      - PAPERLESS_REDIS=redis://broker:6379
      - PAPERLESS_TIME_ZONE=America/New_York
      - PAPERLESS_OCR_LANGUAGE=eng
      - PAPERLESS_ADMIN_USER=admin
      - PAPERLESS_ADMIN_PASSWORD=yourpassword
      - PAPERLESS_URL=http://localhost:8000
      - PAPERLESS_CONSUME_DIR=/usr/src/paperless/consume
      - PAPERLESS_CONSUMER_RECURSIVE=true
      - PAPERLESS_CONSUMER_POLLING=300
      - PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=true
      - PAPERLESS_DISABLE_PERMISSIONS=true
    networks:
      - paperless
volumes:
  redisdata:
  data:
  media:

networks:
  paperless:

