created paperless-ngx
This commit is contained in:
1 parent
152804269b
commit
72059b4b9d
3 files changed
+157
No files matched your search
@@ -0,0 +1,62 @@
|
||||
# ----------------------------------------------------
|
||||
# Paperless-NGX - Docker Compose Environment Variables
|
||||
# ----------------------------------------------------
|
||||
# Copy this file to .env and fill in your values.
|
||||
|
||||
# ----------------------------
|
||||
# App
|
||||
# ----------------------------
|
||||
|
||||
# Docker image tag for Paperless-NGX
|
||||
PAPERLESS_VERSION=latest
|
||||
|
||||
# Host port to expose the Paperless web UI on
|
||||
PAPERLESS_PORT=8022
|
||||
|
||||
# User and group ID the app process runs as (match your bind mount ownership)
|
||||
PAPERLESS_USERMAP_UID=0
|
||||
PAPERLESS_USERMAP_GID=0
|
||||
|
||||
# Long random string used to sign sessions — generate with: openssl rand -hex 64
|
||||
PAPERLESS_SECRET_KEY=
|
||||
|
||||
# Consume folder polling — needed when the consume path is a network share (inotify events don't propagate)
|
||||
PAPERLESS_CONSUMER_POLLING=60
|
||||
PAPERLESS_CONSUMER_POLLING_RETRY_COUNT=10
|
||||
PAPERLESS_CONSUMER_POLLING_DELAY=60
|
||||
|
||||
# Host paths for the app's bind mounts (e.g. /mnt/paperless/data)
|
||||
PAPERLESS_DATA_PATH=
|
||||
PAPERLESS_MEDIA_PATH=
|
||||
PAPERLESS_EXPORT_PATH=
|
||||
PAPERLESS_CONSUME_PATH=
|
||||
|
||||
# ----------------------------
|
||||
# Database (PostgreSQL)
|
||||
# ----------------------------
|
||||
|
||||
# Postgres image tag
|
||||
PAPERLESS_DB_VERSION=17
|
||||
|
||||
# Database credentials — must match between app and db services
|
||||
PAPERLESS_DB_NAME=paperless
|
||||
PAPERLESS_DB_USERNAME=paperless
|
||||
PAPERLESS_DB_PASSWORD=
|
||||
|
||||
# ----------------------------
|
||||
# Redis
|
||||
# ----------------------------
|
||||
|
||||
# Redis image tag
|
||||
PAPERLESS_REDIS_VERSION=8
|
||||
|
||||
# ----------------------------
|
||||
# NFS Volumes
|
||||
# ----------------------------
|
||||
|
||||
# IP address or hostname of the NFS server
|
||||
PAPERLESS_NFS_SERVER=
|
||||
|
||||
# NFS export paths for the db and redis volumes (e.g. :/mnt/pool/paperless/db)
|
||||
PAPERLESS_DB_NFS_DEVICE=
|
||||
PAPERLESS_REDIS_NFS_DEVICE=
|
||||
@@ -0,0 +1,94 @@
|
||||
services:
|
||||
app:
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:${PAPERLESS_VERSION:-latest}
|
||||
container_name: paperless-app
|
||||
ports:
|
||||
- ${PAPERLESS_PORT:-8022}:8000
|
||||
volumes:
|
||||
- ${PAPERLESS_DATA_PATH}:/usr/src/paperless/data
|
||||
- ${PAPERLESS_MEDIA_PATH}:/usr/src/paperless/media
|
||||
- ${PAPERLESS_EXPORT_PATH}:/usr/src/paperless/export
|
||||
- ${PAPERLESS_CONSUME_PATH}:/usr/src/paperless/consume
|
||||
environment:
|
||||
PAPERLESS_REDIS: redis://redis:6379
|
||||
PAPERLESS_DBHOST: db
|
||||
PAPERLESS_DBNAME: ${PAPERLESS_DB_NAME:-paperless}
|
||||
PAPERLESS_DBUSER: ${PAPERLESS_DB_USERNAME:-paperless}
|
||||
PAPERLESS_DBPASS: ${PAPERLESS_DB_PASSWORD}
|
||||
USERMAP_UID: ${PAPERLESS_USERMAP_UID:-0}
|
||||
USERMAP_GID: ${PAPERLESS_USERMAP_GID:-0}
|
||||
PAPERLESS_CONSUMER_POLLING: ${PAPERLESS_CONSUMER_POLLING:-60}
|
||||
PAPERLESS_CONSUMER_POLLING_RETRY_COUNT: ${PAPERLESS_CONSUMER_POLLING_RETRY_COUNT:-10}
|
||||
PAPERLESS_CONSUMER_POLLING_DELAY: ${PAPERLESS_CONSUMER_POLLING_DELAY:-60}
|
||||
PAPERLESS_FILENAME_FORMAT: '{{ created }} {{ title }}'
|
||||
PAPERLESS_SECRET_KEY: ${PAPERLESS_SECRET_KEY}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 90s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 3G
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
image: postgres:${PAPERLESS_DB_VERSION:-17}
|
||||
container_name: paperless-db
|
||||
volumes:
|
||||
- paperless-db:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: ${PAPERLESS_DB_NAME:-paperless}
|
||||
POSTGRES_USER: ${PAPERLESS_DB_USERNAME:-paperless}
|
||||
POSTGRES_PASSWORD: ${PAPERLESS_DB_PASSWORD}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${PAPERLESS_DB_USERNAME:-paperless} -d ${PAPERLESS_DB_NAME:-paperless}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
image: redis:${PAPERLESS_REDIS_VERSION:-8}
|
||||
container_name: paperless-redis
|
||||
volumes:
|
||||
- paperless-redis:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 256M
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
paperless-db:
|
||||
name: paperless-db
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: nfs
|
||||
o: "addr=${PAPERLESS_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4"
|
||||
device: "${PAPERLESS_DB_NFS_DEVICE}"
|
||||
paperless-redis:
|
||||
name: paperless-redis
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: nfs
|
||||
o: "addr=${PAPERLESS_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4"
|
||||
device: "${PAPERLESS_REDIS_NFS_DEVICE}"
|
||||
Reference in new issue
Block a user