-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (43 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
45 lines (43 loc) · 1.29 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
services:
sql-agent:
build: .
ports:
- "8000:8000"
environment:
- GROQ_API_KEY=${GROQ_API_KEY}
- POSTGRES_SERVER=postgres
- POSTGRES_DB=${SQL_AGENT_DB_NAME:-sql_agent}
- POSTGRES_USER=${SQL_AGENT_DB_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- DATABASE_URL=postgresql://${SQL_AGENT_DB_USER:-postgres}:${POSTGRES_PASSWORD}@postgres:5432/${SQL_AGENT_DB_NAME:-sql_agent}
- CSV_DATA_PATH=/app/ipl_data.csv
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
restart: unless-stopped
volumes:
- ./db/sql/entities:/app/db/sql/entities
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=${SQL_AGENT_DB_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${SQL_AGENT_DB_NAME:-sql_agent}
ports:
- "5433:5432"
volumes:
- sql_agent_data:/var/lib/postgresql/data
- ./db/sql/setup_db.sql:/docker-entrypoint-initdb.d/01-setup.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
sql_agent_data: