Skip to content

Commit 07ff979

Browse files
committed
app(paperless): configuration for the real thing
1 parent 401979f commit 07ff979

File tree

4 files changed

+83
-3
lines changed

4 files changed

+83
-3
lines changed

blob-postgres/compose.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
services:
2+
sidecar:
3+
extends:
4+
file: ../sidecar-compose.yaml
5+
service: .sidecar
6+
env_file: ../${TAILNET_CONFIG:-blob}/.tailscale.env
7+
hostname: ${TAILNET_HOST_NAME:-blob-postgres}
8+
volumes:
9+
- tailscale-data:/var/lib/tailscale
10+
environment:
11+
- TS_SERVE_PORT=9090
12+
13+
postgresql:
14+
image: "postgres:17"
15+
restart: always
16+
network_mode: "service:sidecar"
17+
user: postgres
18+
command: >
19+
postgres
20+
-c config_file=/etc/postgresql/postgresql.conf
21+
-c hba_file=/etc/postgresql/pg_hba.conf
22+
environment:
23+
PGDATA: /var/lib/postgresql/data
24+
POSTGRES_DB: postgres
25+
POSTGRES_USER: postgres
26+
volumes:
27+
- data:/var/lib/postgresql/data
28+
- config:/etc/postgresql
29+
- logs:/var/log/postgresql
30+
31+
volumes:
32+
data:
33+
driver: local
34+
driver_opts:
35+
o: bind
36+
type: none
37+
device: /volume1/postgres/data
38+
config:
39+
driver: local
40+
driver_opts:
41+
o: bind
42+
type: none
43+
device: /volume1/postgres/config
44+
logs:
45+
driver: local
46+
driver_opts:
47+
o: bind
48+
type: none
49+
device: /volume1/postgres/logs
50+
51+
tailscale-data:

host_vars/blob.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ services:
1616
compose_file: compose.yml
1717
- name: minio
1818
compose_file: compose.yaml
19+
- name: blob-postgres
20+
compose_file: compose.yaml
1921

2022
become_for_docker: true

paperless/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Folder Storage
2+
3+
This configuration depends on dropbox being up and running already; it uses the dropbox service on prime, which is manually configured for now.
4+
5+
``` ini
6+
[Unit]
7+
Description=Dropbox Headless Service
8+
After=network.target
9+
10+
[Service]
11+
ExecStart=/home/offby1/.dropbox-dist/dropboxd
12+
Restart=on-failure
13+
User=offby1
14+
Group=offby1
15+
Environment=HOME=/home/offby1
16+
17+
[Install]
18+
WantedBy=multi-user.target
19+
```
20+
21+
That requires selective sync of Dropbox/Documents/paperless and Dropbox/Documents/incoming

paperless/compose.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,23 @@ services:
5656
- gotenberg
5757
- tika
5858
volumes:
59-
- data:/usr/src/paperless/data
60-
- media:/usr/src/paperless/media
6159
- ./export:/usr/src/paperless/export
62-
- ./consume:/usr/src/paperless/consume
60+
# For documentation about these, see README.md
61+
- /home/offby1/Dropbox/Documents/paperless:/media
62+
- /home/offby1/Dropbox/Documents/incoming:/incoming
6363
env_file: docker-compose.env
6464
environment:
6565
PAPERLESS_REDIS: redis://localhost:6379
6666
PAPERLESS_DBHOST: localhost
6767
PAPERLESS_TIKA_ENABLED: 1
6868
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://localhost:3000
6969
PAPERLESS_TIKA_ENDPOINT: http://localhost:9998
70+
PAPERLESS_CONSUMPTION_DIR: /incoming
71+
PAPERLESS_MEDIA_ROOT: /media
72+
PAPERLESS_DATA_ROOT: /media
73+
PAPERLESS_FILENAME_FORMAT: "{{created}} / {{ title or original_name }}"
74+
PAPERLESS_CONSUMER_POLLING: 30
75+
PAPERLESS_CONSUMER_RECURSIVE: true
7076
gotenberg:
7177
image: docker.io/gotenberg/gotenberg:8.24
7278
restart: unless-stopped

0 commit comments

Comments
 (0)