This is my docker compose configuration for running Paperless-NGX on my TrueNAS Scale instance (inside Dockge) as a temporary setup while I get my K8S setup up and running.
-
-
Save qnimbus/60be7a52621c0804093842be2dbd0b79 to your computer and use it in GitHub Desktop.
Paperless docker compose configuration #paperless
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # External URL users will use (important for correct absolute links, auth callbacks, etc.) | |
| PAPERLESS_URL=https://paperless.example.com | |
| PAPERLESS_TIME_ZONE=Europe/Amsterdam | |
| # Generate with: openssl rand -base64 45 | |
| PAPERLESS_SECRET_KEY=<redacted> | |
| # Postgres settings | |
| PAPERLESS_DB_NAME=paperless | |
| PAPERLESS_DB_USER=paperless | |
| PAPERLESS_DB_PASSWORD=<redacted> | |
| # Consumer settings | |
| PAPERLESS_CONSUME_DIR=./consume | |
| PAPERLESS_EXPORT_DIR=./export | |
| PAPERLESS_CONSUMER_POLLING=10 | |
| PAPERLESS_CONSUMER_RECURSIVE=true | |
| # OCR language(s): e.g. "eng", "nld", or "eng+nld" | |
| PAPERLESS_OCR_LANGUAGE=eng+nld | |
| PAPERLESS_OCR_LANGUAGES="eng nld" | |
| PAPERLESS_OCR_USER_ARGS='{"continue_on_soft_render_error": true}' | |
| # Optional services | |
| PAPERLESS_TIKA_ENABLED=true | |
| PAPERLESS_GOTENBERG_ENABLED=true | |
| # Optional first-run admin bootstrap | |
| PAPERLESS_ADMIN_USER=admin | |
| PAPERLESS_ADMIN_PASSWORD=admin | |
| PAPERLESS_ADMIN_MAIL=[email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| db: | |
| image: postgres:16-alpine | |
| container_name: paperless-db | |
| restart: unless-stopped | |
| environment: | |
| POSTGRES_DB: ${PAPERLESS_DB_NAME} | |
| POSTGRES_USER: ${PAPERLESS_DB_USER} | |
| POSTGRES_PASSWORD: ${PAPERLESS_DB_PASSWORD} | |
| volumes: | |
| - db_data:/var/lib/postgresql/data | |
| healthcheck: | |
| test: | |
| - CMD-SHELL | |
| - pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB | |
| interval: 10s | |
| timeout: 5s | |
| retries: 5 | |
| security_opt: | |
| - no-new-privileges:true | |
| redis: | |
| image: redis:7-alpine | |
| container_name: paperless-redis | |
| restart: unless-stopped | |
| command: | |
| - redis-server | |
| - --appendonly | |
| - yes | |
| volumes: | |
| - redis_data:/data | |
| healthcheck: | |
| test: | |
| - CMD | |
| - redis-cli | |
| - ping | |
| interval: 10s | |
| timeout: 3s | |
| retries: 10 | |
| security_opt: | |
| - no-new-privileges:true | |
| # Optional: better PDF/text extraction + Office docs conversion | |
| gotenberg: | |
| image: docker.io/gotenberg/gotenberg:8.25 | |
| container_name: paperless-gotenberg | |
| restart: unless-stopped | |
| security_opt: | |
| - no-new-privileges:true | |
| # The gotenberg chromium route is used to convert .eml files. We do not | |
| # want to allow external content like tracking pixels or even javascript. | |
| command: | |
| - gotenberg | |
| - --chromium-disable-javascript=true | |
| - --chromium-allow-list=file:///tmp/.* | |
| tika: | |
| image: docker.io/apache/tika:latest | |
| container_name: paperless-tika | |
| restart: unless-stopped | |
| security_opt: | |
| - no-new-privileges:true | |
| paperless: | |
| image: ghcr.io/paperless-ngx/paperless-ngx:latest | |
| container_name: paperless | |
| restart: unless-stopped | |
| depends_on: | |
| db: | |
| condition: service_healthy | |
| redis: | |
| condition: service_healthy | |
| ports: | |
| - 8000:8000 | |
| environment: | |
| # Core | |
| PAPERLESS_URL: ${PAPERLESS_URL} | |
| PAPERLESS_TIME_ZONE: ${PAPERLESS_TIME_ZONE} | |
| PAPERLESS_SECRET_KEY: ${PAPERLESS_SECRET_KEY} | |
| # Database | |
| PAPERLESS_DBHOST: db | |
| PAPERLESS_DBNAME: ${PAPERLESS_DB_NAME} | |
| PAPERLESS_DBUSER: ${PAPERLESS_DB_USER} | |
| PAPERLESS_DBPASS: ${PAPERLESS_DB_PASSWORD} | |
| # Redis | |
| PAPERLESS_REDIS: redis://redis:6379 | |
| # Recommended ingestion settings | |
| PAPERLESS_CONSUMER_POLLING: ${PAPERLESS_CONSUMER_POLLING} | |
| PAPERLESS_CONSUMER_RECURSIVE: ${PAPERLESS_CONSUMER_RECURSIVE} | |
| PAPERLESS_OCR_LANGUAGE: ${PAPERLESS_OCR_LANGUAGE} | |
| PAPERLESS_OCR_LANGUAGES: ${PAPERLESS_OCR_LANGUAGES} | |
| PAPERLESS_OCR_USER_ARGS: ${PAPERLESS_OCR_USER_ARGS} | |
| # Tika / Gotenberg settings | |
| PAPERLESS_TIKA_ENABLED: 1 | |
| PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000 | |
| PAPERLESS_TIKA_ENDPOINT: http://tika:9998 | |
| # Admin bootstrap (only used on first run if you choose to) | |
| PAPERLESS_ADMIN_USER: ${PAPERLESS_ADMIN_USER} | |
| PAPERLESS_ADMIN_PASSWORD: ${PAPERLESS_ADMIN_PASSWORD} | |
| PAPERLESS_ADMIN_MAIL: ${PAPERLESS_ADMIN_MAIL} | |
| volumes: | |
| # Where you drop documents to be consumed | |
| - ${PAPERLESS_CONSUME_DIR}:/usr/src/paperless/consume | |
| # Persistent application data (index, thumbnails, etc.) | |
| - paperless_data:/usr/src/paperless/data | |
| # Persistent media (originals + archived files) | |
| - paperless_media:/usr/src/paperless/media | |
| # Exports | |
| - ${PAPERLESS_EXPORT_DIR}:/usr/src/paperless/export | |
| healthcheck: | |
| test: | |
| - CMD-SHELL | |
| - curl -fsS http://127.0.0.1:8000/ >/dev/null || exit 1 | |
| interval: 30s | |
| timeout: 5s | |
| retries: 10 | |
| security_opt: | |
| - no-new-privileges:true | |
| volumes: | |
| redis_data: null | |
| db_data: null | |
| paperless_data: null | |
| paperless_media: null | |
| networks: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment