-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
132 lines (126 loc) · 3.95 KB
/
Copy pathdocker-compose.yml
File metadata and controls
132 lines (126 loc) · 3.95 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-codesentinel}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-codesentinel_pass}
POSTGRES_DB: ${POSTGRES_DB:-codesentinel}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-codesentinel} -d $${POSTGRES_DB:-codesentinel}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
app:
build: .
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
volumes:
- codesentinel_artifacts:/var/lib/codesentinel
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-codesentinel}:${POSTGRES_PASSWORD:-codesentinel_pass}@db:5432/${POSTGRES_DB:-codesentinel}
REDIS_URL: redis://redis:6379/0
ARTIFACTS_ROOT: /var/lib/codesentinel
ANALYSIS_WORKER_EMBEDDED: "false"
ANALYSIS_DIRECT_DISPATCH_ENABLED: "true"
AGENT_RUNNER_URL: http://agent-runner:8000/api/v1
AGENT_RUNNER_SECRET: ${AGENT_RUNNER_SECRET:-local-agent-runner-secret}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)\""]
interval: 20s
timeout: 5s
retries: 5
restart: unless-stopped
frontend:
build:
context: ./client
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-/api/v1}
ports:
- "5173:80"
depends_on:
app:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/health >/dev/null 2>&1 || exit 1"]
interval: 20s
timeout: 5s
retries: 5
restart: unless-stopped
graphify-worker:
build: .
command: python -m app.workers.analysis_worker
volumes:
- codesentinel_artifacts:/var/lib/codesentinel
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-codesentinel}:${POSTGRES_PASSWORD:-codesentinel_pass}@db:5432/${POSTGRES_DB:-codesentinel}
REDIS_URL: redis://redis:6379/0
ARTIFACTS_ROOT: /var/lib/codesentinel
ANALYSIS_WORKER_CONCURRENCY: ${ANALYSIS_WORKER_CONCURRENCY:-2}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "python -c \"import os, redis; r=redis.Redis.from_url(os.getenv('REDIS_URL','redis://redis:6379/0')); r.ping()\""]
interval: 20s
timeout: 5s
retries: 5
restart: unless-stopped
agent-runner:
build: .
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
volumes:
- codesentinel_artifacts:/var/lib/codesentinel
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-codesentinel}:${POSTGRES_PASSWORD:-codesentinel_pass}@db:5432/${POSTGRES_DB:-codesentinel}
REDIS_URL: redis://redis:6379/0
ARTIFACTS_ROOT: /var/lib/codesentinel
ANALYSIS_WORKER_EMBEDDED: "false"
ANALYSIS_DIRECT_DISPATCH_ENABLED: "false"
AGENT_RUNNER_SECRET: ${AGENT_RUNNER_SECRET:-local-agent-runner-secret}
AUTO_APPLY_SCHEMA: "false"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)\""]
interval: 20s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
redis_data:
codesentinel_artifacts: