Added paperless

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
pull/1/head
TuDatTr 2023-10-07 14:47:09 +02:00
parent 67d88c6576
commit 3f88065da4
3 changed files with 87 additions and 3 deletions

View File

@ -458,9 +458,31 @@ nginx:
jellyfin:
host: "jellyfin"
port: "8096"
config: "{{docker_data_dir}}/jellyfin/config"
cache: "{{docker_data_dir}}/jellyfin/cache"
config: "{{docker_dir}}/jellyfin/config"
cache: "{{docker_dir}}/jellyfin/cache"
media:
tv: "{{ plex_tv }}"
movies: "{{ plex_movies }}"
music: "{{ plex_music }}"
#
# paperless-ngx
#
paperless:
host: "paperless"
port: "8000"
data:
data: "{{ docker_dir }}/paperless/data/data"
media: "{{ docker_dir }}/paperless/data/media"
export: "{{ docker_dir }}/paperless/data/export"
consume: "{{ docker_dir }}/paperless/data/consume"
db:
host: "paperless-sqlite"
db: "paperless"
user: "paperless"
password: "{{ host.paperless.db.password }}"
data: "{{ docker_dir }}/paperless/db/data"
redis:
host: "paperless-redis"
data: "{{ docker_dir }}/paperless/redis/data"

View File

@ -5,6 +5,7 @@ ansible_ssh_private_key_file: '{{ pk_path }}'
ansible_become_pass: '{{ vault.aya01.sudo }}'
host:
hostname: "aya01"
ip: "{{ ansible_host }}"
backblaze:
account: "{{ vault.aya01.backblaze.account }}"
@ -43,3 +44,6 @@ host:
type: "fuse.mergerfs"
samba:
password: "{{ vault.aya01.samba.password }}"
paperless:
db:
password: "{{ vault.aya01.paperless.db.password }}"

View File

@ -35,7 +35,7 @@ services:
- PGID={{pgid}}
- TZ={{timezone}}
- "WEBPASSWORD={{ vault_aya01_pihole_password }}"
- "ServerIP={{aya01_ip}}"
- "ServerIP={{ host.ip }}"
- "INTERFACE=eth0"
- "DNS1=1.1.1.1"
- "DNS1=1.0.0.1"
@ -377,6 +377,64 @@ services:
ports:
- "{{ jellyfin.port }}:{{ jellyfin.port }}"
broker:
container_name: {{ paperless.redis.host }}
image: docker.io/library/redis:7
restart: unless-stopped
depends_on:
- pihole
networks:
- net
volumes:
- {{paperless.redis.data}}:/data
db:
container_name: {{ paperless.db.host }}
image: docker.io/library/postgres:15
restart: unless-stopped
depends_on:
- pihole
networks:
- net
volumes:
- {{paperless.db.data}}:/var/lib/postgresql/data
environment:
POSTGRES_DB: {{ paperless.db.db }}
POSTGRES_USER: {{ paperless.db.user }}
POSTGRES_PASSWORD: {{ paperless.db.password }}
paperless:
container_name: {{ paperless.host }}
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- db
- broker
networks:
- net
ports:
- "{{ paperless.port }}:{{ paperless.port }}"
healthcheck:
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:{{ paperless.port }}"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- {{ paperless.data.data }}:/usr/src/paperless/data
- {{ paperless.data.media }}:/usr/src/paperless/media
- {{ paperless.data.export }}:/usr/src/paperless/export
- {{ paperless.data.consume }}:/usr/src/paperless/consume
environment:
- "PAPERLESS_REDIS=redis://broker:6379"
- "PAPERLESS_DBHOST=db"
- "PAPERLESS_DBUSER={{paperless.db.user}}"
- "PAPERLESS_DBPASS={{paperless.db.password}}"
- "USERMAP_UID={{ puid }}"
- "USERMAP_GID={{ pgid}}"
- "PAPERLESS_URL=https://{{paperless.host}}.{{ host.hostname }}.{{ backup_domain }}"
- "PAPERLESS_TIME_ZONE={{ timezone }}"
- "PAPERLESS_OCR_LANGUAGE=deu"
networks:
zoneminder:
driver: bridge