-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 1.88 KB
/
docker-compose.yml
File metadata and controls
53 lines (51 loc) · 1.88 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
services:
# ── Backend API ─────────────────────────────────────────────────────────────
api:
build: .
ports:
- "8000:8000"
environment:
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
- HYPERBOLIC_API_KEY=${HYPERBOLIC_API_KEY}
- USE_SQLITE=${USE_SQLITE:-true}
- R2_ACCOUNT_ID=${R2_ACCOUNT_ID:-}
- R2_ACCESS_KEY_ID=${R2_ACCESS_KEY_ID:-}
- R2_SECRET_ACCESS_KEY=${R2_SECRET_ACCESS_KEY:-}
- R2_BUCKET_NAME=${R2_BUCKET_NAME:-dataflow-local}
volumes:
- ./data:/app/data
- ./sample_data.csv:/app/sample_data.csv:ro
- ./sample_large_data.csv:/app/sample_large_data.csv:ro
restart: unless-stopped
# ── Frontend — Dev (hot-reload, Vite) ────────────────────────────────────
# Usage: docker compose --profile dev up
frontend-dev:
profiles: [dev]
image: node:20-alpine
working_dir: /app
command: sh -c "npm install && npm run dev"
ports:
- "3000:3000"
volumes:
- ./frontend:/app # live source mount — edits reflect instantly
- /app/node_modules # keep container's node_modules separate
environment:
- VITE_API_URL=http://api:8000
- CHOKIDAR_USEPOLLING=true # reliable file-watching in Docker
depends_on:
- api
restart: unless-stopped
# ── Frontend — Production (nginx, static build) ──────────────────────────
# Usage: docker compose up (default profile)
frontend:
profiles: [prod]
build:
context: ./frontend
args:
- VITE_API_URL=http://localhost:8000
ports:
- "3000:3000"
depends_on:
- api
restart: unless-stopped