-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
94 lines (89 loc) · 2.24 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
94 lines (89 loc) · 2.24 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
version: "3.9"
services:
db:
image: pgvector/pgvector:pg16
restart: unless-stopped
environment:
POSTGRES_DB: ${DATABASE_NAME:-groundtruth}
POSTGRES_USER: ${DATABASE_USER:-groundtruth}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:?Set DATABASE_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER:-groundtruth}"]
interval: 5s
timeout: 5s
retries: 5
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
deploy:
resources:
limits:
memory: 2G
networks:
- groundtruth
api:
image: groundtruth-api:latest
restart: unless-stopped
ports:
- "8000:8000"
environment:
DATABASE_HOST: db
DATABASE_PORT: 5432
DATABASE_NAME: ${DATABASE_NAME:-groundtruth}
DATABASE_USER: ${DATABASE_USER:-groundtruth}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:?Set DATABASE_PASSWORD}
DATABASE_URL: postgresql+asyncpg://${DATABASE_USER:-groundtruth}:${DATABASE_PASSWORD}@db:5432/${DATABASE_NAME:-groundtruth}
OPENAI_API_KEY: ${OPENAI_API_KEY:?Set OPENAI_API_KEY}
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-text-embedding-3-small}
APP_ENV: production
LOG_FORMAT: json
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
deploy:
resources:
limits:
memory: 1G
networks:
- groundtruth
web:
image: groundtruth-web:latest
restart: unless-stopped
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
depends_on:
api:
condition: service_healthy
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
deploy:
resources:
limits:
memory: 512M
networks:
- groundtruth
volumes:
pgdata:
networks:
groundtruth:
driver: bridge