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' %} # Postgres # postgres: 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" - "--chromium-disable-routes=true" restart: unless-stopped networks: - paperless # Apache TIKA # tika: image: "ghcr.io/paperless-ngx/tika:{{ paperless_image_version_tika }}" command: - "gotenberg" # - "--chromium-disable-routes=true" 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 {% endif %} 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: {}