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