First, create a new directory
mkdir ~/papermerge
According to the github page of Papermerge, the docker image for papermerge is called papermerge/papermerge. Pull it with docker by running:
sudo docker pull papermerge/papermerge:3.5.2
Since I want to use Docker Compose for the different microservices, I create a new compose.yaml
file in the ~/papermerge
directory (which you may need to create by mkdir ~/papermerge
). The most basic file looks like this.
services:
webapp:
image: papermerge/papermerge:3.5.2
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: admin
ports:
- "12000:80"
It will probably throw some errors due to the usage of SQLite, but it should be accessible by opening a browser and going to localhost:12000
According to the compatibility matrix of Papermerge, we should use PostgreSQL 16.1 with papermerge:3.5.2. Pull it:
sudo docker pull postgres:16.1
In order to use PostgreSQL, we have to adapt the compose.yaml file.
services:
webapp:
image: papermerge/papermerge:3.5.2
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: admin
PAPERMERGE__DATABASE__URL: postgresql://coco:jumbo@db:5432/pmgdb
ports:
- "12000:80"
depends_on:
- db
db:
image: postgres:16.1
volumes:
- pgdata:/var/lib/postgresql/data/
environment:
POSTGRES_PASSWORD: jumbo
POSTGRES_DB: pmgdb
POSTGRES_USER: coco
healthcheck:
test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 5s
timeout: 10s
retries: 5
start_period: 10s
volumes:
pgdata: