-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (99 loc) · 2.68 KB
/
Copy pathdocker-compose.yml
File metadata and controls
105 lines (99 loc) · 2.68 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: repograph
services:
postgres:
image: postgres:16-alpine
container_name: repograph-postgres
restart: unless-stopped
environment:
POSTGRES_USER: repograph
POSTGRES_PASSWORD: repograph
POSTGRES_DB: repograph
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U repograph"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: repograph-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
command: redis-server --save 60 1 --loglevel warning
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: repograph-api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
DATABASE_URL: postgresql://repograph:repograph@postgres:5432/repograph?schema=public
REDIS_URL: redis://redis:6379
PORT: 3001
NODE_ENV: production
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
GITHUB_TOKENS: ${GITHUB_TOKENS:-}
RATE_LIMIT_MAX_GRAPHS_PER_DAY_PER_IP: ${RATE_LIMIT_MAX_GRAPHS_PER_DAY_PER_IP:-3}
TURNSTILE_SECRET_KEY: ${TURNSTILE_SECRET_KEY:-}
TURNSTILE_BYPASS_IN_DEV: ${TURNSTILE_BYPASS_IN_DEV:-true}
ports:
- "3001:3001"
volumes:
- ./apps/api:/app/apps/api:ro
- ./packages:/app/packages:ro
worker:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: repograph-worker
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
api:
condition: service_started
environment:
DATABASE_URL: postgresql://repograph:repograph@postgres:5432/repograph?schema=public
REDIS_URL: redis://redis:6379
NODE_ENV: production
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
WORKER_CONCURRENCY: 5
command: ["node", "dist/main.js"] # same entry, processor starts via IngestionProcessor init
volumes:
- ./apps/api:/app/apps/api:ro
- ./packages:/app/packages:ro
web:
build:
context: .
dockerfile: apps/web/Dockerfile
container_name: repograph-web
restart: unless-stopped
depends_on:
- api
environment:
NEXT_PUBLIC_API_URL: http://localhost:3001
NEXT_PUBLIC_TURNSTILE_SITE_KEY: ${NEXT_PUBLIC_TURNSTILE_SITE_KEY:-}
PORT: 3000
ports:
- "3000:3000"
volumes:
pgdata:
redisdata: