-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
52 lines (48 loc) · 1.15 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
services:
db:
image: ankane/pgvector
container_name: text2sql-db
restart: always
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: text2sqldb
ports:
- "5432:5432"
volumes:
- ./data:/var/lib/postgresql/data
- ./init/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
- ./dvdrental.tar:/docker-entrypoint-initdb.d/dvdrental.tar
web:
image: python:3.11-slim
container_name: text2sql-web
restart: always
build:
context: .
dockerfile: Dockerfile
ports:
- "8501:8501"
environment:
- PYTHONPATH=/app
volumes:
- ./:/app
command: /bin/bash -c "python /app/init/init_table_docs.py && streamlit run main.py --server.port=8501 --server.address=0.0.0.0"
depends_on:
- db
runner:
image: python:3.11-slim
container_name: text2sql-runner
restart: "no"
build:
context: .
dockerfile: Dockerfile
environment:
- PYTHONPATH=/app
volumes:
- ./:/app
working_dir: /app
command: >
/bin/bash -c "sleep 5 && python /app/main_test.py"
depends_on:
- db
- web