-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (32 loc) · 916 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
33 lines (32 loc) · 916 Bytes
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
services:
db:
build:
context: .
target: data-packer # tells Docker to use Stage2 from your Dockerfile
image: shivammodi09/rag-text2sql-db:latest
container_name: sql-db
restart: always
environment:
MYSQL_DATABASE: text_to_sql
MYSQL_ROOT_PASSWORD: ${SQL_PASSWORD}
ports:
- "3307:3306" # Maps 3307 on your local to 3306 in Docker
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${SQL_PASSWORD}"]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
image: shivammodi09/rag-text2sql-app:latest
container_name: text2sql-app
depends_on:
db:
condition: service_healthy # App waits for DB to be "Ready" before starting
env_file:
- .env
environment:
- DB_HOST=db
ports:
- "8000:8000" # FastAPI Backend
- "8501:8501" # Streamlit Frontend