Docker Compose files to spin up an instance of paperless-ngx.
# How to run
Add a `COMPOSE_ENV` file and save its location as a shell variable along with the location where this repo lives, here for example `/opt/containers/paperless_ngx` plus all other variables. At [env/fqdn_context.env.example](env/fqdn_context.env.example) you'll find an example environment file.
When everything's ready start paperless-ngx with Docker Compose, otherwise head down to [Initial setup](#initial-setup) first.
## Environment
We're assuming that the upstream Git repo [github.com/paperless-ngx/paperless-ngx](https://github.com/paperless-ngx/paperless-ngx) is checked out locally. In our example we're assuming it's living at `/opt/git/github.com/paperless-ngx/paperless-ngx/tags/latest`. The repo contains multiple Docker Compose files in [docker/compose](https://github.com/paperless-ngx/paperless-ngx/tree/dev/docker/compose) dir, we'll be using one of them as our baseline.
On your deployment machine create the necessary Docker context to connect to and control the Docker daemon on whatever target host you'll be using, for example:
Copy images to target Docker host, that is assuming you deploy to a machine that itself has no network route to reach Docker Hub or your private registry of choice. Copying in its simplest form involves a local `docker save` and a remote `docker load`. Consider the helper mini-project [quico.space/Quico/copy-docker](https://quico.space/Quico/copy-docker) where [copy-docker.sh](https://quico.space/Quico/copy-docker/src/branch/main/copy-docker.sh) allows the following workflow:
We're assuming you run Docker Compose workloads with ZFS-based bind mounts. ZFS management, creating a zpool and setting adequate properties for its datasets is out of scope of this document.
## Datasets
Create ZFS datasets and set permissions as needed.