-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 2.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (67 loc) · 2.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: "3.8"
services:
# Python AI Engine
engine:
build:
context: ./apps/engine
dockerfile: Dockerfile
ports:
- "8000:8000"
security_opt:
- no-new-privileges:true
# ╔══════════════════════════════════════════════════════════╗
# ║ FIX: Removed read_only: true ║
# ║ Problem: Python needs to write tmp_model/ for ║
# ║ SpeechBrain model cache. tmpfs only covers /tmp. ║
# ╚══════════════════════════════════════════════════════════╝
tmpfs:
- /tmp
environment:
- PYTHONUNBUFFERED=1
# Hono Backend (Node.js via tsx)
api:
# FIX: Use node image instead of bun — package.json scripts use npx tsx
image: node:20-alpine
working_dir: /app/apps/api
command: sh -c "npm install && npx tsx watch src/index.ts"
ports:
- "3000:3000"
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp
volumes:
- .:/app
depends_on:
- engine
environment:
- DATABASE_URL=${DATABASE_URL}
- CLERK_PUBLISHABLE_KEY=${CLERK_PUBLISHABLE_KEY}
- CLERK_SECRET_KEY=${CLERK_SECRET_KEY}
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS}
# ╔══════════════════════════════════════════════════════════╗
# ║ FIX: Added missing environment variables ║
# ║ These were missing → API couldn't reach engine or ║
# ║ Cloudflare image proxy ║
# ╚══════════════════════════════════════════════════════════╝
- ENGINE_URL=http://engine:8000
- IMAGE_API_URL=${IMAGE_API_URL}
# Frontend (Vite)
web:
image: node:20-alpine
working_dir: /app/apps/web
command: sh -c "npm install && npm run dev -- --host"
ports:
- "5173:5173"
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp
volumes:
- .:/app
depends_on:
- api
environment:
- VITE_CLERK_PUBLISHABLE_KEY=${CLERK_PUBLISHABLE_KEY}
# FIX: Added API URL so frontend knows where to call
- VITE_API_URL=http://localhost:3000