-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 1.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
services:
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: citetrack
# Tuned for a 2cpu/2gb VPS — the postgres-alpine defaults assume
# much more RAM headroom than that. Override these in a compose
# overlay if you're on a beefier host.
command:
- postgres
- -c
- shared_buffers=128MB
- -c
- effective_cache_size=384MB
- -c
- work_mem=4MB
- -c
- maintenance_work_mem=32MB
- -c
- max_connections=20
- -c
- wal_compression=on
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
tor:
image: peterdavehello/tor-socks-proxy@sha256:0cc12d36d31265ce828c8422a7e163a0bf46755e90531f4c7d38a6149f071729
restart: unless-stopped
app:
image: ghcr.io/devanfer02/citetrack:${TAG:-latest}
build: .
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
TOR_SOCKS_HOST: tor
TOR_SOCKS_PORT: "9150"
env_file:
- path: .env
ports:
- "${APP_PORT:-3000}:3000"
volumes:
# Mount the local KBBI dump into the image so docker-entrypoint.sh can
# load it on first boot. The dump file itself is gitignored (large) and
# placed at deploy/seed/kbbi-dictionary.sql on the host.
- ./deploy/seed:/app/deploy/seed:ro
# Persist uploaded PDFs (thesis, evaluation, and reference sources)
# so they survive container rebuilds. src/lib/paths.ts writes under
# process.cwd()/uploads which is /app/uploads in the image.
- uploads:/app/uploads
volumes:
pgdata:
uploads: