-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
90 lines (85 loc) · 2.35 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
90 lines (85 loc) · 2.35 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
db:
image: postgres:16-alpine
restart: always
environment:
POSTGRES_DB: vibe_db
POSTGRES_USER: vibe
POSTGRES_PASSWORD: vibe_secret
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vibe -d vibe_db"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
restart: always
ports:
- "8080:8080"
environment:
- PORT=8080
- ENV=development
- DATABASE_URL=postgres://vibe:vibe_secret@db:5432/vibe_db?sslmode=disable
- REDIS_URL=redis://redis:6379
- LOG_LEVEL=debug
- ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8080
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
- GEMINI_MODEL=${GEMINI_MODEL:-google/gemini-3-flash-preview}
- YOUTUBE_API_KEY=${YOUTUBE_API_KEY}
# Google OAuth 2.0 配置 (Captions API 需要)
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- GOOGLE_REDIRECT_URL=${GOOGLE_REDIRECT_URL:-http://localhost:3000/auth/google/callback}
# Debug log path (mounted volume)
- DEBUG_LOG_PATH=/app/.cursor/debug.log
volumes:
# 挂载源代码,代码变化会立即反映到容器中
- ./backend:/go/src/vibe-backend
# 挂载 .cursor 目录用于调试日志
- ./.cursor:/app/.cursor
# 排除不需要同步的目录
- /go/src/vibe-backend/tmp
- /go/src/vibe-backend/vendor
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8080
- NODE_ENV=development
volumes:
# 挂载源代码,Next.js 会自动热重载
- ./frontend:/app
# 排除 node_modules,使用容器内的
- /app/node_modules
- /app/.next
depends_on:
- backend
volumes:
postgres_data:
redis_data: