-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
171 lines (162 loc) · 4.27 KB
/
docker-compose.dev.yml
File metadata and controls
171 lines (162 loc) · 4.27 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
version: '3.8'
services:
# CodeSight MCP Server - Development Environment
codesight-dev:
build:
context: .
dockerfile: Dockerfile.dev
container_name: codesight-mcp-dev
ports:
- "4000:4000" # REST API
- "8080:8080" # WebSocket/MCP
- "9229:9229" # Node.js debugger
environment:
- NODE_ENV=development
- LOG_LEVEL=debug
- DATABASE_URL=postgresql://postgres:password@postgres-dev:5432/codesight_dev
- REDIS_URL=redis://redis-dev:6379
- STORAGE_BACKEND=postgresql
- CACHE_BACKEND=redis
- RUST_FFI_PATH=/app/rust-core/target/release
- ENABLE_RUST_FFI=true
- FFI_GRACEFUL_FALLBACK=true
- HOT_RELOAD=true
volumes:
- .:/app:cached
- /app/node_modules
- rust-core-target:/app/rust-core/target
- dev-data:/app/data
- dev-logs:/app/logs
depends_on:
- postgres-dev
- redis-dev
restart: unless-stopped
networks:
- codesight-dev-network
command: npm run dev
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# PostgreSQL - Development
postgres-dev:
image: pgvector/pgvector:pg16
container_name: codesight-postgres-dev
environment:
- POSTGRES_DB=codesight_dev
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
volumes:
- postgres-dev-data:/var/lib/postgresql/data
- ./docker/postgres/init-dev.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5433:5432"
restart: unless-stopped
networks:
- codesight-dev-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Redis - Development
redis-dev:
image: redis:7-alpine
container_name: codesight-redis-dev
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis-dev-data:/data
ports:
- "6380:6379"
restart: unless-stopped
networks:
- codesight-dev-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
# Development Database Admin
pgadmin-dev:
image: dpage/pgadmin4:latest
container_name: codesight-pgadmin-dev
environment:
- PGADMIN_DEFAULT_EMAIL=admin@codesight.dev
- PGADMIN_DEFAULT_PASSWORD=admin
volumes:
- pgadmin-dev-data:/var/lib/pgadmin
ports:
- "5050:80"
restart: unless-stopped
networks:
- codesight-dev-network
depends_on:
- postgres-dev
# Redis Commander - Development
redis-commander-dev:
image: rediscommander/redis-commander:latest
container_name: codesight-redis-commander-dev
environment:
- REDIS_HOSTS=local:redis-dev:6379
ports:
- "8081:8081"
restart: unless-stopped
networks:
- codesight-dev-network
depends_on:
- redis-dev
# Development Documentation Server
docs-dev:
image: squidfunk/mkdocs-material:latest
container_name: codesight-docs-dev
volumes:
- ./docs:/docs
ports:
- "3000:8000"
restart: unless-stopped
networks:
- codesight-dev-network
command: mkdocs serve --dev-addr=0.0.0.0:8000
# Test Project Analysis
test-project-analyzer:
build:
context: .
dockerfile: Dockerfile.dev
container_name: codesight-test-analyzer
environment:
- NODE_ENV=test
- DATABASE_URL=postgresql://postgres:password@postgres-dev:5432/codesight_test
- REDIS_URL=redis://redis-dev:6379
volumes:
- ./test-data:/app/test-data:cached
- rust-core-target:/app/rust-core/target
networks:
- codesight-dev-network
depends_on:
- postgres-dev
- redis-dev
profiles:
- testing
command: ["node", "dist/cli/index.js", "index", "/app/test-data"]
volumes:
postgres-dev-data:
driver: local
redis-dev-data:
driver: local
pgadmin-dev-data:
driver: local
rust-core-target:
driver: local
dev-data:
driver: local
dev-logs:
driver: local
networks:
codesight-dev-network:
driver: bridge
ipam:
config:
- subnet: 172.21.0.0/16