ansible-role-paperless-ngx/templates/docker-compose.yml.j2

115 lines
2.9 KiB
Plaintext
Raw Normal View History

2022-10-07 14:31:40 +02:00
version: "3.3"
services:
# Redis
#
broker:
image: docker.io/library/redis:{{ paperless_image_version_redis }}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
networks:
- paperless
volumes:
- {{ paperless_volume_redis }}:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
{% if paperless_db_host == 'postgres' %}
2022-10-07 14:31:40 +02:00
# Postgres
#
2023-02-14 01:18:50 +01:00
postgres-init:
image: docker.io/library/postgres:{{ paperless_image_version_db }}
volumes:
- "{{ paperless_volume_db }}:/data"
entrypoint:
- sh
- -c
- |
chown -R 70:70 /data
2022-10-07 14:31:40 +02:00
postgres:
2023-02-14 01:18:50 +01:00
depends_on:
postgres-init:
condition: service_completed_successfully
2022-10-07 14:31:40 +02:00
image: docker.io/library/postgres:{{ paperless_image_version_db }}
env_file:
- "{{ paperless_setup_path | expanduser }}/env.db.conf"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
networks:
- paperless
{% if paperless_db_port %}
ports:
- {{ paperless_db_port }}:5432
{% endif %}
volumes:
- {{ paperless_volume_db }}:/var/lib/postgresql/data
{% else %}
#
# External database at "{{ paperless_db_schema }}:{{ paperless_db_host }}: {{ paperless_db_port }}"
#
{% endif %}
# Gotenberg
#
gotenberg:
image: "gotenberg/gotenberg:{{ paperless_image_version_gotenberg }}"
command:
- "gotenberg"
2023-02-14 00:56:13 +01:00
- "--chromium-disable-javascript=true"
- "--chromium-allow-list=file:///tmp/.*"
2023-10-18 17:35:10 +02:00
- "--pdfengines-engines=pdftk,uno-pdfengine"
2022-10-07 14:31:40 +02:00
restart: unless-stopped
networks:
- paperless
# Apache TIKA
#
tika:
image: "ghcr.io/paperless-ngx/tika:{{ paperless_image_version_tika }}"
restart: unless-stopped
networks:
- paperless
# The paperless image
#
paperless:
image: "ghcr.io/paperless-ngx/paperless-ngx:{{ paperless_image_version_paperless }}"
env_file:
- "{{ paperless_setup_path | expanduser }}/env.paperless.conf"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:{{ paperless_port }}"]
interval: 30s
timeout: 10s
retries: 5
depends_on:
- broker
- gotenberg
- tika
{% if paperless_db_host == 'postgres' %}
- postgres-init
- postgres
{% endif %}
2022-10-07 14:31:40 +02:00
ports:
- "{{ paperless_port }}:8000"
volumes:
- "{{ paperless_volume_media }}:/usr/src/paperless/media"
- "{{ paperless_volume_metadata }}:/usr/src/paperless/data"
- "{{ paperless_volume_consume }}:/usr/src/paperless/consume"
- "{{ paperless_volume_export }}:/usr/src/paperless/export"
networks:
- paperless
networks:
paperless: {}