Merge pull request from paperless-ngx/feature-arm-tika-consolidate

Deployment: Consolidate tika compose files
This commit is contained in:
Quinn Casey 2022-05-02 15:56:02 -07:00 committed by GitHub
commit 2b322b638e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 103 deletions

@ -1,7 +1,6 @@
# docker-compose file for running paperless from the docker container registry. # docker-compose file for running paperless from the docker container registry.
# This file contains everything paperless needs to run. # This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware. The apache/tika image # Paperless supports amd64, arm and arm64 hardware.
# does not support arm or arm64, however.
# #
# All compose files of paperless configure paperless in the following way: # All compose files of paperless configure paperless in the following way:
# #
@ -78,14 +77,14 @@ services:
PAPERLESS_TIKA_ENDPOINT: http://tika:9998 PAPERLESS_TIKA_ENDPOINT: http://tika:9998
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
command: command:
- "gotenberg" - "gotenberg"
- "--chromium-disable-routes=true" - "--chromium-disable-routes=true"
tika: tika:
image: apache/tika image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped restart: unless-stopped
volumes: volumes:

@ -1,85 +0,0 @@
# docker-compose file for running paperless from the docker container registry.
# This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware.
#
# All compose files of paperless configure paperless in the following way:
#
# - Paperless is (re)started on system boot, if it was running before shutdown.
# - Docker volumes for storing data are managed by Docker.
# - Folders for importing and exporting files are created in the same directory
# as this file and mounted to the correct folders inside the container.
# - Paperless listens on port 8000.
#
# SQLite is used as the database. The SQLite file is stored in the data volume.
#
# iwishiwasaneagle/apache-tika-arm docker image is used to enable arm64 arch
# which apache/tika does not currently support.
#
# In addition to that, this docker-compose file adds the following optional
# configurations:
#
# - Apache Tika and Gotenberg servers are started with paperless and paperless
# is configured to use these services. These provide support for consuming
# Office documents (Word, Excel, Power Point and their LibreOffice counter-
# parts.
#
# To install and update paperless with this file, do the following:
#
# - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env'
# and '.env' into a folder.
# - Run 'docker-compose pull'.
# - Run 'docker-compose run --rm webserver createsuperuser' to create a user.
# - Run 'docker-compose up -d'.
#
# For more extensive installation and update instructions, refer to the
# documentation.
version: "3.4"
services:
broker:
image: redis:6.0
restart: unless-stopped
volumes:
- redisdata:/data
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- broker
- gotenberg
- tika
ports:
- 8000:8000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- data:/usr/src/paperless/data
- media:/usr/src/paperless/media
- ./export:/usr/src/paperless/export
- ./consume:/usr/src/paperless/consume
env_file: docker-compose.env
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
gotenberg:
image: gotenberg/gotenberg:7
restart: unless-stopped
command:
- "gotenberg"
- "--chromium-disable-routes=true"
tika:
image: iwishiwasaneagle/apache-tika-arm@sha256:a78c25ffe57ecb1a194b2859d42a61af46e9e845191512b8f1a4bf90578ffdfd
restart: unless-stopped
volumes:
data:
media:
redisdata:

@ -1,8 +1,6 @@
# docker-compose file for running paperless from the docker container registry. # docker-compose file for running paperless from the docker container registry.
# This file contains everything paperless needs to run. # This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware. The apache/tika image # Paperless supports amd64, arm and arm64 hardware.
# does not support arm or arm64, however.
#
# All compose files of paperless configure paperless in the following way: # All compose files of paperless configure paperless in the following way:
# #
# - Paperless is (re)started on system boot, if it was running before shutdown. # - Paperless is (re)started on system boot, if it was running before shutdown.
@ -67,14 +65,14 @@ services:
PAPERLESS_TIKA_ENDPOINT: http://tika:9998 PAPERLESS_TIKA_ENDPOINT: http://tika:9998
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
command: command:
- "gotenberg" - "gotenberg"
- "--chromium-disable-routes=true" - "--chromium-disable-routes=true"
tika: tika:
image: apache/tika image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped restart: unless-stopped
volumes: volumes:

@ -474,7 +474,7 @@ PAPERLESS_TIKA_GOTENBERG_ENDPOINT=<url>
Defaults to "http://localhost:3000". Defaults to "http://localhost:3000".
If you run paperless on docker, you can add those services to the docker-compose If you run paperless on docker, you can add those services to the docker-compose
file (see the provided ``docker-compose.tika.yml`` file for reference). The changes file (see the provided ``docker-compose.sqlite-tika.yml`` file for reference). The changes
requires are as follows: requires are as follows:
.. code:: yaml .. code:: yaml
@ -495,14 +495,14 @@ requires are as follows:
# ... # ...
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
command: command:
- "gotenberg" - "gotenberg"
- "--chromium-disable-routes=true" - "--chromium-disable-routes=true"
tika: tika:
image: apache/tika image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped restart: unless-stopped
Add the configuration variables to the environment of the webserver (alternatively Add the configuration variables to the environment of the webserver (alternatively

@ -347,7 +347,7 @@ writing. Windows is not and will never be supported.
paperless stores its data. If you like, you can point both to the same directory. paperless stores its data. If you like, you can point both to the same directory.
* ``PAPERLESS_SECRET_KEY`` should be a random sequence of characters. It's used for authentication. Failure * ``PAPERLESS_SECRET_KEY`` should be a random sequence of characters. It's used for authentication. Failure
to do so allows third parties to forge authentication credentials. to do so allows third parties to forge authentication credentials.
* ``PAPERLESS_URL`` if you are behind a reverse proxy. This should point to your domain. Please see * ``PAPERLESS_URL`` if you are behind a reverse proxy. This should point to your domain. Please see
:ref:`configuration` for more information. :ref:`configuration` for more information.
Many more adjustments can be made to paperless, especially the OCR part. The following options are recommended Many more adjustments can be made to paperless, especially the OCR part. The following options are recommended
@ -728,8 +728,6 @@ configuring some options in paperless can help improve performance immensely:
times. Thumbnails will be about 20% larger. times. Thumbnails will be about 20% larger.
* If using docker, consider setting ``PAPERLESS_WEBSERVER_WORKERS`` to * If using docker, consider setting ``PAPERLESS_WEBSERVER_WORKERS`` to
1. This will save some memory. 1. This will save some memory.
* Use the arm compatible docker-compose if you're wanting to use Tika on something like
a raspberry pi. The official apache/tika image does not support the arm architecture.
For details, refer to :ref:`configuration`. For details, refer to :ref:`configuration`.

@ -125,7 +125,7 @@ If using docker-compose, this is achieved by the following configuration change
.. code:: yaml .. code:: yaml
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
command: command:
- "gotenberg" - "gotenberg"

@ -2,5 +2,5 @@
docker run -p 5432:5432 -e POSTGRES_PASSWORD=password -v paperless_pgdata:/var/lib/postgresql/data -d postgres:13 docker run -p 5432:5432 -e POSTGRES_PASSWORD=password -v paperless_pgdata:/var/lib/postgresql/data -d postgres:13
docker run -d -p 6379:6379 redis:latest docker run -d -p 6379:6379 redis:latest
docker run -p 3000:3000 -d gotenberg/gotenberg:7 docker run -p 3000:3000 -d gotenberg/gotenberg:7.4
docker run -p 9998:9998 -d apache/tika docker run -p 9998:9998 -d ghcr.io/paperless-ngx/tika:latest