-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
61 lines (57 loc) · 1.39 KB
/
docker-compose.dev.yml
File metadata and controls
61 lines (57 loc) · 1.39 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
services:
postgres:
image: pgvector/pgvector:pg17
container_name: vector-cv-postgres
env_file: .env
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "${DB_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile.backend
environment:
# Construct the URL using the service name 'postgres'
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}
- OPENAI_API_KEY=${OPENAI_API_KEY}
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
volumes:
- ./my_data:/app/my_data
- ./generated_docs:/app/generated_docs
- ./api_logs:/app/api_logs
streamlit:
build:
context: .
dockerfile: Dockerfile.streamlit
env_file: .env
environment:
API_URL: http://backend:8010
ports:
- "${STREAMLIT_PORT}:8501"
depends_on:
- backend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "${FRONTEND_PORT}:80"
depends_on:
- streamlit
- backend
volumes:
postgres_data: