-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.17 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
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: job_recommendation_db
environment:
POSTGRES_USER: job_user
POSTGRES_PASSWORD: job_password
POSTGRES_DB: job_recommendations
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U job_user -d job_recommendations"]
interval: 5s
timeout: 3s
retries: 10
networks:
- job-network
# Backend API (FastAPI)
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: job_recommendation_api
environment:
DATABASE_URL: postgresql://job_user:job_password@postgres:5432/job_recommendations
ENVIRONMENT: development
DEBUG: "true"
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./backend:/app/backend
- ./data:/app/data
command: uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --reload
networks:
- job-network
restart: unless-stopped
volumes:
postgres_data:
networks:
job-network:
driver: bridge