-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
132 lines (119 loc) · 3.74 KB
/
docker-compose.example.yml
File metadata and controls
132 lines (119 loc) · 3.74 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
version: '3.8'
services:
codealive-mcp:
# Use the latest stable image from GitHub Container Registry
image: ghcr.io/codealive-ai/codealive-mcp:main
# Container name for easy reference
container_name: codealive-mcp-server
# Restart policy - automatically restart if container stops
restart: unless-stopped
# Port mapping - expose MCP server on port 8000
ports:
- "8000:8000"
# Environment variables
environment:
# ==========================================
# CONFIGURATION FOR SELF-HOSTED CODEALIVE
# ==========================================
# Uncomment and set this to your self-hosted CodeAlive instance URL
# REQUIRED for self-hosted deployments
# CODEALIVE_BASE_URL: "https://codealive.yourcompany.com"
# ==========================================
# CONFIGURATION FOR CODEALIVE CLOUD
# ==========================================
# For CodeAlive Cloud, comment out or remove CODEALIVE_BASE_URL above
# The server will use the default: https://app.codealive.ai
# ==========================================
# API KEY CONFIGURATION (IMPORTANT!)
# ==========================================
# In HTTP mode, API keys should be provided by clients via
# "Authorization: Bearer YOUR_KEY" headers, NOT environment variables.
#
# Do NOT set CODEALIVE_API_KEY here in production.
# Each client connection should provide their own API key.
# ==========================================
# OPTIONAL SETTINGS
# ==========================================
# Enable debug mode (verbose logging)
# DEBUG_MODE: "false"
# Disable SSL verification (only for development/testing)
# CODEALIVE_IGNORE_SSL: "false"
# Command to run the MCP server in HTTP mode
command: >
python src/codealive_mcp_server.py
--transport http
--host 0.0.0.0
--port 8000
# Health check configuration
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Resource limits (adjust based on your needs)
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
# ==========================================
# USAGE INSTRUCTIONS
# ==========================================
#
# 1. Copy this file to docker-compose.yml:
# cp docker-compose.example.yml docker-compose.yml
#
# 2. Edit docker-compose.yml:
# - For self-hosted: Uncomment and set CODEALIVE_BASE_URL
# - For cloud: Leave CODEALIVE_BASE_URL commented out
#
# 3. Start the service:
# docker compose up -d
#
# 4. Check health:
# curl http://localhost:8000/health
#
# 5. Connect AI clients using:
# - URL: http://your-server:8000/api
# - Header: Authorization: Bearer YOUR_API_KEY
#
# ==========================================
# EXAMPLES
# ==========================================
#
# Claude Code:
# claude mcp add --transport http codealive http://localhost:8000/api \
# --header "Authorization: Bearer YOUR_API_KEY"
#
# Cursor/Other Clients (JSON config):
# {
# "mcpServers": {
# "codealive": {
# "url": "http://localhost:8000/api",
# "headers": {
# "Authorization": "Bearer YOUR_API_KEY"
# }
# }
# }
# }
#
# ==========================================
# TROUBLESHOOTING
# ==========================================
#
# View logs:
# docker compose logs -f codealive-mcp
#
# Restart service:
# docker compose restart codealive-mcp
#
# Stop service:
# docker compose down
#
# Update to latest version:
# docker compose pull
# docker compose up -d