Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (46 loc) · 1.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (46 loc) · 1.55 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
services:
# ── Backend (FastAPI) ── connects to Supabase ──────────
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: learnerverse-backend
restart: unless-stopped
ports:
- "8000:8000"
env_file: .env
environment:
BACKEND_HOST: "0.0.0.0"
BACKEND_PORT: "8000"
UPLOAD_DIR: "/app/uploads"
PAYMENT_GATEWAY_ENABLED: "${PAYMENT_GATEWAY_ENABLED:-false}"
CORS_ORIGINS: "http://localhost:3000,http://localhost:5173,https://learner-verse.vercel.app"
volumes:
- uploads:/app/uploads
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/docs')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
# ── Frontend (React + Nginx) ───────────────────────────
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8000/api/v1}
VITE_SINGLE_USER_MODE: ${VITE_SINGLE_USER_MODE:-false}
VITE_AUTH0_DOMAIN: ${VITE_AUTH0_DOMAIN:-}
VITE_AUTH0_CLIENT_ID: ${VITE_AUTH0_CLIENT_ID:-}
VITE_AUTH0_AUDIENCE: ${VITE_AUTH0_AUDIENCE:-}
VITE_PAYMENT_GATEWAY_ENABLED: ${VITE_PAYMENT_GATEWAY_ENABLED:-false}
container_name: learnerverse-frontend
restart: unless-stopped
ports:
- "3000:80"
depends_on:
backend:
condition: service_healthy
volumes:
uploads: