85 lines
2.9 KiB
YAML
85 lines
2.9 KiB
YAML
services:
|
|
gotenberg:
|
|
image: thecodingmachine/gotenberg:${GOTEMBERG_VERSION}
|
|
restart: unless-stopped
|
|
environment:
|
|
- DISABLE_GOOGLE_CHROME=1
|
|
networks:
|
|
- internal
|
|
paperless:
|
|
image: jonaswinkler/paperless-ng:${PAPERLESS_VERSION}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- gotenberg
|
|
- postgres
|
|
- redis
|
|
- tika
|
|
environment:
|
|
- PAPERLESS_ADMIN_EMAIL=${PAPERLESS_ADMIN_EMAIL}
|
|
- PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER}
|
|
- PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD}
|
|
- PAPERLESS_DBHOST=postgres
|
|
- PAPERLESS_DBNAME=${POSTGRES_NAME}
|
|
- PAPERLESS_DBUSER=${POSTGRES_USER}
|
|
- PAPERLESS_DBPASS=${POSTGRES_PASS}
|
|
- PAPERLESS_OCR_LANGUAGE=${PAPERLESS_OCR_LANGUAGE}
|
|
- PAPERLESS_TIKA_ENABLED=1
|
|
- PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://gotenberg:3000
|
|
- PAPERLESS_TIKA_ENDPOINT=http://tika:9998
|
|
- PAPERLESS_TIME_ZONE=${PAPERLESS_TIME_ZONE}
|
|
- PAPERLESS_REDIS=redis://redis:6379
|
|
- PAPERLESS_SECRET_KEY=${PAPERLESS_SECRET_KEY}
|
|
labels:
|
|
- traefik.enable=${TRAEFIK_ENABLED}
|
|
- traefik.docker.network=${TRAEFIK_NETWORK}
|
|
### Section HTTP
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
|
|
# redirect to HTTPS only
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
|
|
### Section HTTPS
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
|
|
# configure the exposed service
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
|
|
# of course, enable TLS and it's certificate provider
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
|
|
# specify a service so a custom port can be used
|
|
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
|
|
networks:
|
|
- internal
|
|
- traefik
|
|
volumes:
|
|
- ./data/paperless/data:/usr/src/paperless/data
|
|
- ./data/paperless/media:/usr/src/paperless/media
|
|
- ./data/paperless/export:/usr/src/paperless/export
|
|
- ./data/paperless/consume:/usr/src/paperless/consume
|
|
postgres:
|
|
image: postgres:${POSTGRES_VERSION}
|
|
restart: unless-stopped
|
|
volumes:
|
|
environment:
|
|
- POSTGRES_DB=${POSTGRES_NAME}
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASS}
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
redis:
|
|
image: redis:${REDIS_VERSION}
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal
|
|
tika:
|
|
image: apache/tika:${TIKA_VERSION}
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal
|
|
|
|
networks:
|
|
internal:
|
|
traefik:
|
|
external: true
|
|
name: ${TRAEFIK_NETWORK}
|