-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 1.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (39 loc) · 1.07 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
version: "3.9"
# Development compose — HTTP only, ports exposed for local debugging.
# Usage: docker compose up --build
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
env_file: ./backend/.env
environment:
# Override ALLOWED_ORIGINS for Docker: frontend is on port 80, not Vite's 5173
- ALLOWED_ORIGINS=http://localhost,http://127.0.0.1
volumes:
- backend_data:/app/data
ports:
- "8000:8000"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
# Direct URL — the frontend JS calls the backend on port 8000 directly.
# (No nginx proxy needed in dev; port 8000 is exposed above.)
- VITE_API_URL=http://localhost:8000
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
volumes:
backend_data: