forked from
tranquil.farm/tranquil-pds
Our Personal Data Server from scratch!
1services:
2 tranquil-pds:
3 build:
4 context: .
5 dockerfile: Dockerfile
6 image: tranquil-pds:latest
7 restart: unless-stopped
8 environment:
9 SERVER_HOST: "0.0.0.0"
10 volumes:
11 - ./config.toml:/etc/tranquil-pds/config.toml:ro
12 # In memory of @olaren.dev's blobs when lewis forgot to update /tranquil to /tranquil-pds :(
13 - blob_data:/var/lib/tranquil-pds/blobs
14 - store_data:/var/lib/tranquil-pds/store
15 depends_on:
16 db:
17 condition: service_healthy
18 healthcheck:
19 test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/xrpc/_health"]
20 interval: 30s
21 timeout: 10s
22 retries: 3
23 start_period: 10s
24 deploy:
25 resources:
26 limits:
27 memory: 1G
28 reservations:
29 memory: 256M
30
31 db:
32 image: postgres:18-alpine
33 restart: unless-stopped
34 environment:
35 POSTGRES_USER: tranquil_pds
36 POSTGRES_PASSWORD: "CHANGE-ME"
37 POSTGRES_DB: pds
38 volumes:
39 # In memory of @mrrp.lol when Lewis had "/data" here and the account got nuked on restart including rotation key :(
40 - postgres_data:/var/lib/postgresql
41 healthcheck:
42 test: ["CMD-SHELL", "pg_isready -U tranquil_pds -d pds"]
43 interval: 10s
44 timeout: 5s
45 retries: 5
46 start_period: 10s
47 deploy:
48 resources:
49 limits:
50 memory: 512M
51 reservations:
52 memory: 128M
53
54 nginx:
55 image: nginx:1.29-alpine
56 restart: unless-stopped
57 ports:
58 - "80:80"
59 - "443:443"
60 volumes:
61 - ./nginx.conf:/etc/nginx/nginx.conf:ro
62 - ./certs:/etc/nginx/certs:ro
63 - acme_challenge:/var/www/acme:ro
64 depends_on:
65 - tranquil-pds
66 healthcheck:
67 test: ["CMD", "nginx", "-t"]
68 interval: 30s
69 timeout: 10s
70 retries: 3
71
72 certbot:
73 image: certbot/certbot:v5.2.2
74 volumes:
75 - ./certs:/etc/letsencrypt
76 - acme_challenge:/var/www/acme
77 entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew --webroot -w /var/www/acme; sleep 12h & wait $${!}; done'"
78
79 prometheus:
80 image: prom/prometheus:v3.8.0
81 restart: unless-stopped
82 ports:
83 - "127.0.0.1:9090:9090"
84 volumes:
85 - ./observability/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
86 - prometheus_data:/prometheus
87 command:
88 - '--config.file=/etc/prometheus/prometheus.yaml'
89 - '--storage.tsdb.path=/prometheus'
90 - '--storage.tsdb.retention.time=30d'
91 deploy:
92 resources:
93 limits:
94 memory: 256M
95
96volumes:
97 postgres_data:
98 blob_data:
99 store_data:
100 prometheus_data:
101 acme_challenge: