v0.1.0-rc1

This commit is contained in:
Bryan Joshua Pedini 2022-01-30 12:23:42 +01:00
parent 67354b1248
commit 98ba398a86
3 changed files with 125 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/.env
/data

88
docker-compose.yml Normal file
View File

@ -0,0 +1,88 @@
version: "3"
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:
- gotemberg
- 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}
- USERMAP_UID=${USERMAP_UID}
- USERMAP_GID=${USERMAP_GID}
labels:
- traefik.enable=${TRAEFIK_ENABLED}
- traefik.docker.network=traefik
### 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}

35
env.example Normal file
View File

@ -0,0 +1,35 @@
# Gotemberg environment
GOTEMBERG_VERSION=7.4.3
# Paperless environment
PAPERLESS_VERSION=1.5.0
PAPERLESS_ADMIN_EMAIL=admin@mydomain.com
PAPERLESS_ADMIN_USER=admin
PAPERLESS_ADMIN_PASSWORD=Sup3rS3cr3tP4ssw0rd!
PAPERLESS_OCR_LANGUAGE=eng
PAPERLESS_TIME_ZONE=Europe/London
PAPERLESS_SECRET_KEY=ChangeMe
USERMAP_UID=0
USERMAP_GID=0
# PostgreSQL environment
POSTGRES_VERSION=14.1-alpine
POSTGRES_NAME=paperless
POSTGRES_USER=paperless
POSTGRES_PASS=paperless
# Redis environment
REDIS_VERSION=6.0
# Tika environment
TIKA_VERSION=2.2.1
# Træfik environment
TRAEFIK_ENABLED=true
TRAEFIK_CERTRESOLVER=letsencrypt
TRAEFIK_NETWORK=traefik
TRAEFIK_MATCHRULE=paperless.mydomain.com
TRAEFIK_ROUTER=paperless_mydomain_com
TRAEFIK_SERVICE=paperless_mydomain_com
TRAEFIK_SERVICE_PORT=8000
TRAEFIK_TLSENABLED=true