-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.11 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
services:
# 1. PostgreSQL Database
safenav_db:
image: postgres:15-alpine
container_name: safenav_postgres
restart: always
ports:
- "5432:5432"
environment:
- POSTGRES_USER=safenav_user
- POSTGRES_PASSWORD=safenav_password
- POSTGRES_DB=safenav_db
volumes:
- postgres_data:/var/lib/postgresql/data
# 2. Python Backend
backend:
build: ./backend
container_name: safenav_backend
ports:
- "8000:8000"
environment:
# Updated to use PostgreSQL connection string
- DATABASE_URL=postgresql+asyncpg://safenav_user:safenav_password@safenav_db:5432/safenav_db
- SECRET_KEY=CHANGE_THIS_TO_A_SUPER_SECRET_KEY
depends_on:
- safenav_db
volumes:
- ./backend:/app # Live reload for development
# 3. React Frontend
frontend:
build: ./frontend
container_name: safenav_frontend
ports:
- "5173:5173"
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules # Avoid overwriting node_modules
environment:
- VITE_API_URL=http://localhost:8000
volumes:
postgres_data: