122 lines
2.8 KiB
YAML
122 lines
2.8 KiB
YAML
---
|
|
|
|
# Name of the instance (job and service name)
|
|
instance: paperless
|
|
|
|
paperless:
|
|
|
|
# Version to use
|
|
version: 2.12.1
|
|
|
|
# Connect to the postgres service through the mesh
|
|
consul:
|
|
connect:
|
|
upstreams:
|
|
- destination_name: postgres[[ .consul.suffix ]]
|
|
local_bind_port: 5432
|
|
|
|
vault:
|
|
workload_identity:
|
|
role:
|
|
# Vault policies to add to the containers
|
|
token_policies:
|
|
- '[[ .instance ]][[ .consul.suffix ]]'
|
|
# Random secrets to generate and store in vault KV
|
|
rand_secrets:
|
|
fields:
|
|
- secret_key
|
|
|
|
# Env var to set in the containers
|
|
# The ones here will be inherited by all containers
|
|
env:
|
|
PAPERLESS_SECRET_KEY: '{{ with secret "[[ .vault.root ]]kv/service/[[ .instance ]]" }}{{ .Data.data.secret_key }}{{ end }}'
|
|
PAPERLESS_CORS_ALLOWED_HOSTS: '[[ .paperless.webserver.public_url ]]'
|
|
|
|
wait_for:
|
|
- service: primary.postgres[[ .consul.suffix ]]
|
|
|
|
# This is the main task
|
|
webserver:
|
|
|
|
# The Docker image to use
|
|
image: '[[ .docker.repo ]]paperless-ngx:[[ .paperless.version ]]-2'
|
|
|
|
# Env vars to set in the container
|
|
env: {}
|
|
|
|
# Resource allocation
|
|
resources:
|
|
cpu: 300
|
|
memory: 384
|
|
memory_max: 512
|
|
|
|
# The URL where BounCA will be available to users
|
|
public_url: https://paperless.example.org
|
|
|
|
# Traefik settings
|
|
traefik: {}
|
|
|
|
# The consumer will watch a folder (/input, where a volume is mounted) and
|
|
# import any files found.
|
|
consumer:
|
|
|
|
# You can disable the consumer if you do not use it, it'll save some resources
|
|
enabled: true
|
|
|
|
# The Docker image to use
|
|
image: '[[ .paperless.webserver.image ]]'
|
|
|
|
# Env vars to set in the container
|
|
env: {}
|
|
|
|
# Resource allocation
|
|
resources:
|
|
cpu: 100
|
|
memory: 256
|
|
memory_max: 284
|
|
|
|
# Task scheduler
|
|
scheduler:
|
|
|
|
# The Docker image to use
|
|
image: '[[ .paperless.webserver.image ]]'
|
|
|
|
# Env vars to set in the container
|
|
env: {}
|
|
|
|
# Resource allocation
|
|
resources:
|
|
cpu: 100
|
|
memory: 256
|
|
memory_max: 384
|
|
|
|
# The worker doing the document processing
|
|
task_queue:
|
|
|
|
# The Docker image to use
|
|
image: '[[ .paperless.webserver.image ]]'
|
|
|
|
# Env vars to set in the container
|
|
env: {}
|
|
|
|
# Resource allocation
|
|
resources:
|
|
cpu: 500
|
|
memory: 384
|
|
memory_max: 512
|
|
|
|
# Volumes for data persistance and exchange
|
|
volumes:
|
|
|
|
# This is the main volume where paperless keeps your documents
|
|
data:
|
|
type: csi
|
|
source: paperless-data
|
|
|
|
# This is a volume paperless will watch (with the consumer task) and
|
|
# any document found in it will be imported. If the consumer is disabled
|
|
# you can omit this volumes as it'll not be added to the job
|
|
input:
|
|
type: csi
|
|
source: paperless-input
|