forked from wealthsimple/llm-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (58 loc) · 1.67 KB
/
docker-compose.yml
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
version: "3.9"
services:
postgres:
image: postgres:13.3
container_name: llm-gateway-postgres
hostname: postgres
ports:
- "5430:5432"
environment:
- POSTGRES_DB=llm_gateway
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
volumes:
- ./mock-data/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
llm_gateway_backend:
image: llm-gateway-backend
container_name: llm-gateway-backend
command: [
"uvicorn",
"--host",
"0.0.0.0",
"--port",
"5000",
"llm_gateway.app:app",
"--reload"
]
env_file:
- .envrc
ports:
- "5000:5000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "127.0.0.1:5000/api/healthcheck" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
# these are already baked into the image, but make the local dev experience nicer with autoreload
- ./llm_gateway:/usr/src/app/llm_gateway
llm_gateway_frontend:
image: llm-gateway-frontend
container_name: llm-gateway-frontend
command: [
"yarn",
"start"
]
ports:
- "3000:3000"
volumes:
- ./front_end/src:/usr/src/app/src
- ./front_end/public:/usr/src/app/public