Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
105 lines (103 loc) · 3.93 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
105 lines (103 loc) · 3.93 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Docker Compose Development Configuration with HMR
# ============================================================================
# Usage: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
#
# Features:
# - Frontend: Vite dev server with Hot Module Replacement (HMR)
# - Backend: Go with Air for hot reload on file changes
# - Source code mounted as volumes for live editing
#
# Ports:
# - Frontend: http://localhost:5173 (Vite dev server)
# - Backend: http://localhost:3001 (API)
# ============================================================================
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: claraverse-backend-dev
volumes:
# Mount source code for hot reload (replaces base config volumes)
- ./backend:/app
# Exclude tmp directory (air builds here)
- /app/tmp
# Persistent data
- backend-data:/app/data
- backend-uploads:/app/uploads
- backend-logs:/app/logs
environment:
- ENVIRONMENT=development
# MySQL configuration
- DATABASE_URL=mysql://claraverse_user:${MYSQL_PASSWORD:-claraverse_pass_2024}@mysql:3306/claraverse?parseTime=true
- MYSQL_DATABASE=claraverse
- UPLOAD_DIR=/app/uploads
# Use Docker service names
- SEARXNG_URL=http://searxng:8080
- SEARXNG_URLS=http://searxng:8080
- MONGODB_URI=mongodb://mongodb:27017/claraverse
- REDIS_URL=redis://redis:6379
# Development CORS (allow Vite dev server)
- ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000,http://localhost:8080
# Auth & security
- ENCRYPTION_MASTER_KEY=${ENCRYPTION_MASTER_KEY:-}
- JWT_SECRET=${JWT_SECRET:-local_test_jwt_secret_32chars_min}
- FRONTEND_URL=http://localhost:5173
- BACKEND_URL=http://localhost:3001
- SUPERADMIN_USER_IDS=${SUPERADMIN_USER_IDS:-}
# Composio integrations (optional)
- COMPOSIO_API_KEY=${COMPOSIO_API_KEY:-}
- COMPOSIO_GOOGLESHEETS_AUTH_CONFIG_ID=${COMPOSIO_GOOGLESHEETS_AUTH_CONFIG_ID:-}
- COMPOSIO_GMAIL_AUTH_CONFIG_ID=${COMPOSIO_GMAIL_AUTH_CONFIG_ID:-}
- COMPOSIO_LINKEDIN_AUTH_CONFIG_ID=${COMPOSIO_LINKEDIN_AUTH_CONFIG_ID:-}
- COMPOSIO_GOOGLECALENDAR_AUTH_CONFIG_ID=${COMPOSIO_GOOGLECALENDAR_AUTH_CONFIG_ID:-}
- COMPOSIO_GOOGLEDRIVE_AUTH_CONFIG_ID=${COMPOSIO_GOOGLEDRIVE_AUTH_CONFIG_ID:-}
- COMPOSIO_CANVA_AUTH_CONFIG_ID=${COMPOSIO_CANVA_AUTH_CONFIG_ID:-}
- COMPOSIO_TWITTER_AUTH_CONFIG_ID=${COMPOSIO_TWITTER_AUTH_CONFIG_ID:-}
- COMPOSIO_YOUTUBE_AUTH_CONFIG_ID=${COMPOSIO_YOUTUBE_AUTH_CONFIG_ID:-}
- COMPOSIO_ZOOM_AUTH_CONFIG_ID=${COMPOSIO_ZOOM_AUTH_CONFIG_ID:-}
depends_on:
mongodb:
condition: service_healthy
mysql:
condition: service_healthy
redis:
condition: service_healthy
searxng:
condition: service_healthy
restart: "no"
# Override healthcheck for development (more lenient)
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
start_period: 60s
retries: 5
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: claraverse-frontend-dev
ports: !override
- "5173:5173"
volumes:
# Mount source code for HMR
- ./frontend:/app
# Exclude node_modules (use container's installed modules)
- /app/node_modules
environment:
# Vite environment variables
- VITE_API_BASE_URL=http://localhost:3001
- VITE_WS_URL=ws://localhost:3001
- VITE_APP_NAME=ClaraVerse
- VITE_APP_VERSION=dev
depends_on:
- backend
restart: "no"
# Override healthcheck for development
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5173"]
interval: 30s
timeout: 10s
start_period: 60s
retries: 5