2023-09-20 19:47:16 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Paperless-ngx
|
|
|
|
|
2023-09-20 20:38:34 +00:00
|
|
|
Requires=paperless-ngx-postgres.service
|
|
|
|
Requires=paperless-ngx-redis.service
|
|
|
|
Requires=paperless-ngx-tika.service
|
|
|
|
Requires=paperless-ngx-gotenberg.service
|
|
|
|
After=paperless-ngx-postgres.service
|
|
|
|
After=paperless-ngx-redis.service
|
|
|
|
After=paperless-ngx-tika.service
|
|
|
|
After=paperless-ngx-gotenberg.service
|
|
|
|
|
2023-09-20 19:47:16 +00:00
|
|
|
[Container]
|
|
|
|
ContainerName=paperless-ngx
|
|
|
|
Image=ghcr.io/paperless-ngx/paperless-ngx:{{ paperless_ngx_version }}
|
|
|
|
|
|
|
|
Environment=PAPERLESS_SECRET_KEY={{ paperless_secret_key }}
|
|
|
|
Environment=TZ=Europe/Berlin
|
|
|
|
Environment=PAPERLESS_TIME_ZONE=Europe/Berlin
|
|
|
|
Environment=PAPERLESS_OCR_LANGUAGE=deu+eng
|
|
|
|
Environment=PAPERLESS_URL=https://{{ paperless_ngx_url }}
|
|
|
|
|
|
|
|
Environment=PAPERLESS_TIKA_ENABLED=1
|
|
|
|
Environment=PAPERLESS_TIKA_ENDPOINT=http://paperless-ngx-tika:9998
|
|
|
|
Environment=PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://paperless-ngx-gotenberg:3000
|
|
|
|
|
|
|
|
Environment=PAPERLESS_DBENGINE=postgresql
|
|
|
|
Environment=PAPERLESS_DBHOST=paperless-ngx-postgres
|
|
|
|
Environment=PAPERLESS_DBPORT=5432
|
|
|
|
Environment=PAPERLESS_DBNAME=paperless
|
|
|
|
Environment=PAPERLESS_DBUSER=paperless
|
|
|
|
Environment=PAPERLESS_DBPASS=paperless
|
|
|
|
|
|
|
|
Environment=PAPERLESS_REDIS=redis://paperless-ngx-redis:6379
|
|
|
|
|
2023-09-20 20:38:34 +00:00
|
|
|
Environment=PAPERLESS_CONSUMER_ENABLE_BARCODES={{ paperless_barcode_enable }}
|
2023-09-20 19:47:16 +00:00
|
|
|
|
|
|
|
Network=traefik.network
|
|
|
|
Network=paperless.network
|
|
|
|
|
|
|
|
Volume=/var/paperless-ngx/data:/usr/src/paperless/data:rw
|
|
|
|
Volume=/var/paperless-ngx/media:/usr/src/paperless/media:rw
|
|
|
|
Volume=/var/paperless-ngx/export:/usr/src/paperless/export:rw
|
|
|
|
Volume=/var/paperless-ngx/consume:/usr/src/paperless/consume:rw
|
|
|
|
|
|
|
|
Label="traefik.http.routers.paperless-ngx.tls.certresolver=resolver"
|
|
|
|
Label="traefik.http.routers.paperless-ngx.tls=true"
|
|
|
|
Label="traefik.http.routers.paperless-ngx.rule=Host(`{{ paperless_ngx_url }}`)"
|
|
|
|
Label="traefik.http.routers.paperless-ngx.service=paperless-ngx"
|
|
|
|
Label="traefik.http.services.paperless-ngx.loadbalancer.server.port=8000"
|
|
|
|
|
2023-09-21 07:47:49 +00:00
|
|
|
HealthCmd=curl -fs -S --max-time 2 http://localhost:8000
|
2023-09-20 19:47:16 +00:00
|
|
|
HealthInterval=30s
|
|
|
|
HealthTimeout=20s
|
|
|
|
HealthRetries=5
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Restart=on-failure
|
|
|
|
# Restart Delay
|
|
|
|
RestartSec=30
|
|
|
|
# Allowed time for the service to start.
|
|
|
|
TimeoutStartSec=90
|
|
|
|
# Allowed time for the service to stop.
|
|
|
|
TimeoutStopSec=90
|
|
|
|
|
|
|
|
[Install]
|
2023-09-20 20:28:53 +00:00
|
|
|
WantedBy=default.target
|