Streamline config and switch to pg15
This commit is contained in:
120
docker-compose.yml
Executable file
120
docker-compose.yml
Executable file
@@ -0,0 +1,120 @@
|
||||
services:
|
||||
broker:
|
||||
container_name: paperless-broker
|
||||
image: docker.io/library/redis:7
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /volume1/docker/paperless-ngx/redisdata:/data
|
||||
|
||||
# db:
|
||||
# container_name: db-pg
|
||||
# image: docker.io/library/postgres:13
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - /volume1/docker/paperless-ngx/pgdata:/var/lib/postgresql/data
|
||||
# environment:
|
||||
# POSTGRES_DB: paperless
|
||||
# POSTGRES_USER: paperless
|
||||
# POSTGRES_PASSWORD: paperless
|
||||
|
||||
db-15:
|
||||
container_name: paperless-postgres-db
|
||||
image: postgres:15-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- paperless-postgres-db:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: paperless
|
||||
POSTGRES_USER: ${PG_USER}
|
||||
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
||||
|
||||
db-backup:
|
||||
container_name: paperless-db-backup
|
||||
image: postgres:15-alpine
|
||||
env_file: ./paperless-backup.env
|
||||
volumes:
|
||||
- ./database-dump:/dump
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
sleep 2m
|
||||
while /bin/true; do
|
||||
pg_dump -Fc > /dump/dump_\`date +%d-%m-%Y"_"%H_%M_%S\`.psql
|
||||
(ls -t /dump/dump*.psql|head -n $$BACKUP_NUM_KEEP;ls /dump/dump*.psql)|sort|uniq -u|xargs rm -- {}
|
||||
sleep $$BACKUP_FREQUENCY
|
||||
done
|
||||
EOF'
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
restart: always
|
||||
ports:
|
||||
- 8484:8080
|
||||
|
||||
webserver:
|
||||
container_name: paperless-webserver
|
||||
# image: ghcr.io/paperless-ngx/paperless-ngx:2.8.6
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:${IMAGE_VERSION_PAPERLESS}
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db-15
|
||||
- broker
|
||||
- gotenberg
|
||||
- tika
|
||||
ports:
|
||||
# <Host Port>:<Container Port>
|
||||
- 8010:8000
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
volumes:
|
||||
- /home/basti/Projects/paperless/data:/usr/src/paperless/data
|
||||
- /home/basti/Projects/paperless/media:/usr/src/paperless/media
|
||||
- /home/basti/Projects/paperless/export:/usr/src/paperless/export
|
||||
- /var/opt/paperless/consume:/usr/src/paperless/consume
|
||||
- /home/basti/Projects/paperless/scripts:/usr/src/paperless/scripts
|
||||
environment:
|
||||
PAPERLESS_REDIS: redis://broker:6379
|
||||
PAPERLESS_DBHOST: db-15
|
||||
PAPERLESS_DBUSER: ${PG_USER}
|
||||
|
||||
|
||||
PAPERLESS_OCR_LANGUAGE: deu+eng
|
||||
PAPERLESS_CONSUMER_DELETE_DUPLICATES: "true"
|
||||
PAPERLESS_POST_CONSUME_SCRIPT: /usr/src/paperless/scripts/post_consume.py
|
||||
PAPERLESS_PRE_CONSUME_SCRIPT: /usr/src/paperless/scripts/pre-consume.sh
|
||||
USERMAP_UID: 0
|
||||
USERMAP_GID: 0
|
||||
PAPERLESS_TIKA_ENABLED: 1
|
||||
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
|
||||
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
|
||||
env_file:
|
||||
- ./docker-compose.env
|
||||
|
||||
gotenberg:
|
||||
container_name: paperless-gotenberg
|
||||
image: docker.io/gotenberg/gotenberg:${IMAGE_VERSION_GOTENBERG}
|
||||
restart: unless-stopped
|
||||
|
||||
# The gotenberg chromium route is used to convert .eml files. We do not
|
||||
# want to allow external content like tracking pixels or even javascript.
|
||||
command:
|
||||
- "gotenberg"
|
||||
- "--chromium-disable-javascript=true"
|
||||
- "--chromium-allow-list=file:///tmp/.*"
|
||||
|
||||
tika:
|
||||
container_name: paperless-tika
|
||||
image: docker.io/apache/tika:latest
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
data:
|
||||
media:
|
||||
pgdata:
|
||||
paperless-postgres-db:
|
||||
name: paperless-postgres-db
|
||||
redisdata:
|
||||
Reference in New Issue
Block a user