Add paperless/docker-compose.yml

This commit is contained in:
Jeff Clement 2024-04-09 15:16:30 +00:00
commit 2255b94c38
1 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,87 @@
version: "3.4"
services:
tailscale:
hostname: ${TS_HOSTNAME} # This will become the tailscale device name
image: tailscale/tailscale:stable
volumes:
- ./data/tailscale:/tailscale # State data will be stored in this directory
- /dev/net/tun:/dev/net/tun # Required for tailscale to work
- ./data/tailscale.tmp:/tmp
cap_add: # Required for tailscale to work
- net_admin
- sys_module
environment:
TS_HOSTNAME: ${TS_HOSTNAME}
TS_AUTHKEY: ${TS_AUTHKEY}
TS_AUTH_ONCE: true
TS_STATE_DIR: /tailscale
restart: unless-stopped
caddy:
image: caddy:alpine
network_mode: service:tailscale
volumes:
- ./data/caddy_data:/data
- ./data/tailscale.tmp:/var/run/tailscale
command: ["caddy", "reverse-proxy", "--from", "${TS_HOSTNAME}.${TS_SUFFIX}", "--to", "webserver:8000"]
depends_on:
- tailscale
- webserver
restart: always
broker:
image: redis:6.0
restart: unless-stopped
volumes:
- ./data/redisdata:/data
db:
image: postgres:13
restart: unless-stopped
volumes:
- ./data/pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: paperless
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- db
- broker
- tika
- gotenberg
healthcheck:
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./data/data:/usr/src/paperless/data
- ./data/media:/usr/src/paperless/media
- ./export:/usr/src/paperless/export
- ./incoming:/usr/src/paperless/consume
env_file: .env
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
gotenberg:
image: gotenberg/gotenberg:7.4
restart: unless-stopped
command:
- "gotenberg"
- "--chromium-disable-routes=true"
environment:
DISABLE_GOOGLE_CHROME: 1
DEFAULT_WAIT_TIMEOUT: 30
tika:
image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped