Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (59 loc) · 2.15 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (59 loc) · 2.15 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
version: '3.8'
# ============================================================================
# Codebase State Manager - Docker Compose
#
# This compose file demonstrates two operation modes:
# 1. WITH internal Neo4j (docker-compose.yml - main)
# 2. With external Neo4j (see docker-compose.external.yml)
#
# To use SQLite only:
# NEO4J_ENABLED=false docker-compose up
# ============================================================================
services:
# ==========================================================================
# Main Container: MCP Server with EMBEDDED Neo4j
# ==========================================================================
app:
build:
context: .
dockerfile: Dockerfile
container_name: codebase-state-manager
ports:
- "8080:8080" # MCP Server
- "7474:7474" # Neo4j HTTP
- "7687:7687" # Neo4j Bolt
environment:
# Operation mode
NEO4J_ENABLED: "true" # true = use Neo4j, false = SQLite
DB_MODE: "neo4j" # neo4j or sqlite
# Neo4j Configuration (when NEO4J_ENABLED=true)
NEO4J_URI: "bolt://localhost:7687"
NEO4J_USER: "neo4j"
NEO4J_PASSWORD: "password"
# Docker volume for persistent data
DOCKER_VOLUME_NAME: "codebase_state_data"
volumes:
# Persistent data
- codebase_data:/app/data
# Optional: Mount local project for development
# - ./:/app/project:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "python3", "-c", "import socket; s=socket.socket(); s.connect(('localhost',7687)); s.close()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# ============================================================================
# Volumes
# ============================================================================
volumes:
codebase_data:
driver: local
# ============================================================================
# Networks (for future communication with other services)
# ============================================================================
networks:
default:
name: codebase-network
driver: bridge