-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (42 loc) · 1.13 KB
/
docker-compose.yml
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
version: '3.9'
services:
backend:
build: ./backend
container_name: medicabinet-backend
volumes:
- ./:/app # mount the entire repository
working_dir: /app
ports:
- "8085:8000"
# Use reload for development; note the command is overridden here
# Use the full package path so that relative imports work
command: uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload
depends_on:
- db
frontend:
build: ./frontend
container_name: medicabinet-frontend
volumes:
- ./frontend:/app
# Persist node_modules inside the container to avoid conflicts with host
- frontend_node_modules:/app/node_modules
ports:
- "5173:5173"
environment:
- CHOKIDAR_USEPOLLING=true
working_dir: /app
# Start the development server
command: npm run dev
db:
image: postgres:15
container_name: medicabinet-db
restart: always
environment:
POSTGRES_USER: medicabinet
POSTGRES_PASSWORD: secret
POSTGRES_DB: medicabinet_db
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
frontend_node_modules: