services: redis: image: redis:7 command: - /bin/sh - -c - redis-server --requirepass redispass container_name: PaperlessNGX-REDIS hostname: paper-redis mem_limit: 512m mem_reservation: 256m cpu_shares: 768 security_opt: - no-new-privileges:true read_only: true healthcheck: test: ["CMD-SHELL", "redis-cli ping || exit 1"] volumes: - /var/lib/docker/volumes/paperlessngx/redis:/data:rw environment: TZ: Europe/Paris restart: on-failure:5 db: image: postgres:17 container_name: PaperlessNGX-DB hostname: paper-db mem_limit: 1g cpu_shares: 768 security_opt: - no-new-privileges:true healthcheck: test: ["CMD", "pg_isready", "-q", "-d", "paperless", "-U", "paperlessuser"] timeout: 45s interval: 10s retries: 10 volumes: - /var/lib/docker/volumes/paperlessngx/db:/var/lib/postgresql/data:rw environment: POSTGRES_DB: paperless POSTGRES_USER: paperlessuser POSTGRES_PASSWORD: paperlesspass restart: on-failure:5 gotenberg: image: gotenberg/gotenberg:latest container_name: PaperlessNGX-GOTENBERG hostname: gotenberg security_opt: - no-new-privileges:true command: - "gotenberg" - "--chromium-disable-javascript=true" - "--chromium-allow-list=file:///tmp/.*" restart: on-failure:5 tika: image: ghcr.io/paperless-ngx/tika:latest container_name: PaperlessNGX-TIKA hostname: tika security_opt: - no-new-privileges:true restart: on-failure:5 paperless: image: ghcr.io/paperless-ngx/paperless-ngx:latest container_name: PaperlessNGX hostname: paperless-ngx mem_limit: 6g cpu_shares: 1024 security_opt: - no-new-privileges:true healthcheck: test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"] interval: 30s timeout: 10s retries: 5 ports: - 8777:8000 volumes: - /var/lib/docker/volumes/paperlessngx/data:/usr/src/paperless/data:rw - /var/lib/docker/volumes/paperlessngx/media:/usr/src/paperless/media:rw - /var/lib/docker/volumes/paperlessngx/export:/usr/src/paperless/export:rw - /network/Datas/_ToConsume:/usr/src/paperless/consume:rw - /var/lib/docker/volumes/paperlessngx/trash:/usr/src/paperless/trash:rw environment: PAPERLESS_REDIS: redis://:redispass@paper-redis:6379 PAPERLESS_DBENGINE: postgresql PAPERLESS_DBHOST: paper-db PAPERLESS_DBNAME: paperless PAPERLESS_DBUSER: paperlessuser PAPERLESS_DBPASS: paperlesspass PAPERLESS_EMPTY_TRASH_DIR: ../trash PAPERLESS_FILENAME_FORMAT: '{{ created_year }}/{{ correspondent }}/{{ document_type }}/{{ title }}' PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD: 6 PAPERLESS_TASK_WORKERS: 1 PAPERLESS_CONSUMER_POLLING: 60 PAPERLESS_TIME_ZONE: Europe/Paris PAPERLESS_ADMIN_USER: thedarty PAPERLESS_ADMIN_PASSWORD: St&ph@ne10Nove.@1976 PAPERLESS_URL: http://paperlessngx-dev.maison PAPERLESS_CSRF_TRUSTED_ORIGINS: http://paperlessngx-dev.maison PAPERLESS_OCR_LANGUAGE: fra+eng PAPERLESS_TIKA_ENABLED: 1 PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000 PAPERLESS_TIKA_ENDPOINT: http://tika:9998 restart: on-failure:5 depends_on: db: condition: service_healthy redis: condition: service_healthy tika: condition: service_started gotenberg: condition: service_started