-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 2.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (42 loc) · 2.12 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
services:
# ── FastAPI backend ──────────────────────────────────────────────────────────
backend:
build:
context: ./backend
ports:
- "8000:8000" # host:container — does not conflict with CasaOS
environment:
- SUPABASE_URL=${SUPABASE_URL:-https://your-project.supabase.co}
- SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY:-your-service-role-key}
- LLM_BASE_URL=${LLM_BASE_URL:-https://openrouter.ai/api/v1}
- LLM_API_KEY=${LLM_API_KEY:-}
- LLM_MODEL=${LLM_MODEL:-}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
# Allow both the local frontend container and the browser on your LAN.
# Set SERVER_IP to your home server's local IP, e.g. 192.168.1.10
# Set CORS_ORIGINS explicitly in .env, e.g.:
# CORS_ORIGINS=http://192.168.1.10:3000,http://localhost:3000
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:3000}
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/docs')"]
interval: 30s
timeout: 10s
retries: 3
# ── Next.js frontend ─────────────────────────────────────────────────────────
frontend:
build:
context: ./frontend
args:
# These are baked into the JS bundle at build time.
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL:-https://your-project.supabase.co}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY:-your-anon-key}
# Browser fetches the backend directly — must be reachable from the user's browser.
# Use your home server's LAN IP or hostname, e.g. http://192.168.1.10:8000
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
ports:
- "3000:3000" # host:container
depends_on:
backend:
condition: service_healthy
restart: unless-stopped