Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
171 lines (164 loc) · 4.72 KB
/
Copy pathdocker-compose.yml
File metadata and controls
171 lines (164 loc) · 4.72 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
services:
postgres:
image: postgres:16
container_name: evalledger-postgres
restart: unless-stopped
environment:
POSTGRES_DB: evalledger
POSTGRES_USER: evalledger
POSTGRES_PASSWORD: evalledger
healthcheck:
test: ["CMD-SHELL", "pg_isready -U evalledger -d evalledger"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
deploy:
resources:
limits:
memory: 512M
redis:
image: redis:7
container_name: evalledger-redis
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "6379:6379"
deploy:
resources:
limits:
memory: 256M
minio:
image: minio/minio:latest
container_name: evalledger-minio
command: server /data --console-address ":9001"
restart: unless-stopped
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-evalledger}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-evalledgersecret}
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 15s
timeout: 10s
retries: 5
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
deploy:
resources:
limits:
memory: 512M
api:
build:
context: ./backend
container_name: evalledger-api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
environment:
APP_ENV: development
DATABASE_URL: postgresql+asyncpg://evalledger:evalledger@postgres:5432/evalledger
SYNC_DATABASE_URL: postgresql+psycopg://evalledger:evalledger@postgres:5432/evalledger
REDIS_URL: redis://redis:6379/0
CELERY_BROKER_URL: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/1
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-evalledger-dev-secret}
STORAGE_BACKEND: s3
STORAGE_BUCKET: evalledger-artifacts
STORAGE_S3_ENDPOINT_URL: http://minio:9000
STORAGE_S3_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-evalledger}
STORAGE_S3_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-evalledgersecret}
STORAGE_S3_REGION: us-east-1
STORAGE_S3_PRESIGN_ENDPOINT: http://localhost:9000
CORS_ORIGINS: '["http://localhost:3000"]'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/live"]
interval: 15s
timeout: 5s
retries: 5
start_period: 40s
ports:
- "8000:8000"
volumes:
- ./backend:/app
- backend-storage:/app/storage
command: uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
deploy:
resources:
limits:
cpus: "1.0"
memory: 768M
worker:
build:
context: ./backend
container_name: evalledger-worker
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
environment:
APP_ENV: development
DATABASE_URL: postgresql+asyncpg://evalledger:evalledger@postgres:5432/evalledger
SYNC_DATABASE_URL: postgresql+psycopg://evalledger:evalledger@postgres:5432/evalledger
REDIS_URL: redis://redis:6379/0
CELERY_BROKER_URL: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/1
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-evalledger-dev-secret}
STORAGE_BACKEND: s3
STORAGE_BUCKET: evalledger-artifacts
STORAGE_S3_ENDPOINT_URL: http://minio:9000
STORAGE_S3_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-evalledger}
STORAGE_S3_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-evalledgersecret}
STORAGE_S3_REGION: us-east-1
STORAGE_S3_PRESIGN_ENDPOINT: http://localhost:9000
volumes:
- ./backend:/app
- backend-storage:/app/storage
command: uv run celery -A app.tasks.contamination_tasks.celery_app worker --loglevel=info
deploy:
resources:
limits:
cpus: "1.0"
memory: 1g
frontend:
image: node:20-bookworm-slim
container_name: evalledger-frontend
working_dir: /app
depends_on:
api:
condition: service_healthy
environment:
NEXT_PUBLIC_API_URL: http://localhost:8000
API_INTERNAL_URL: http://api:8000
NODE_ENV: development
ports:
- "3000:3000"
volumes:
- ./frontend:/app
command: sh -c "corepack enable && pnpm install && pnpm dev --hostname 0.0.0.0 --port 3000"
deploy:
resources:
limits:
memory: 1g
volumes:
postgres-data:
minio-data:
backend-storage: