-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (59 loc) · 1.47 KB
/
docker-compose.yml
File metadata and controls
71 lines (59 loc) · 1.47 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
62
63
64
65
66
67
68
69
70
services:
# PostgreSQL Database
db:
image: postgis/postgis:16-3.4
container_name: healthpulse-db
environment:
POSTGRES_USER: healthpulse
POSTGRES_PASSWORD: healthpulse
POSTGRES_DB: healthpulse_db
ports:
- "5434:5432" # Changed to 5434 to avoid conflict with local PostgreSQL on 5432/5433
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U healthpulse"]
interval: 10s
timeout: 5s
retries: 5
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: healthpulse-backend
environment:
DATABASE_URL: postgresql://healthpulse:healthpulse@db:5432/healthpulse_db
API_HOST: 0.0.0.0
API_PORT: 8002
ENVIRONMENT: development
OVERPASS_API_URL: http://172.17.0.1:8080
ports:
- "8002:8000"
volumes:
- ./backend:/app
depends_on:
db:
condition: service_healthy
command: >
sh -c "
python init_db.py &&
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
"
# Frontend (existing)
frontend:
build:
context: .
dockerfile: Dockerfile
container_name: healthpulse-frontend
ports:
- "3001:3000"
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
environment:
- VITE_API_BASE_URL=http://backend:8000/api/v1
depends_on:
- backend
volumes:
postgres_data: