-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.28 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
env_file:
- .env
environment:
WANDB_PROJECT: ${WANDB_PROJECT:-loopprep}
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
volumes:
# Bind-mount for hot reload during local dev (works on Mac + Windows)
- ./backend/app:/app/app
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/health')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:80"
depends_on:
backend:
condition: service_healthy
# Dev-only frontend with Vite HMR (optional — use: docker compose --profile dev up)
frontend-dev:
profiles: ["dev"]
image: node:20-alpine
working_dir: /app
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
ports:
- "5173:5173"
environment:
VITE_API_PROXY_TARGET: http://backend:8000
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
depends_on:
backend:
condition: service_healthy
volumes:
frontend_node_modules: