-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.mcp-admin.yml
More file actions
179 lines (173 loc) · 6.99 KB
/
docker-compose.mcp-admin.yml
File metadata and controls
179 lines (173 loc) · 6.99 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
172
173
174
175
176
177
178
179
# Platform Engineering Copilot - MCP + Admin
# Admin deployment: MCP Server + Admin API + Admin Client
# Use this for platform team administration without chat UI
#
# Usage: docker-compose -f docker-compose.mcp-admin.yml up -d
#
# Ports:
# - 5100: MCP Server (AI agents)
# - 5050: Admin API (REST API for template/environment management)
# - 5000: Admin Client (Blazor WASM web UI)
networks:
platform-network:
driver: bridge
volumes:
sqlserver-data:
platform-logs:
services:
# SQL Server Database (Azure SQL Edge for ARM64/Apple Silicon compatibility)
sqlserver:
image: mcr.microsoft.com/azure-sql-edge:latest
platform: linux/arm64
container_name: pec-sqlserver
hostname: sqlserver
restart: unless-stopped
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=${SA_PASSWORD:-PlatformDB123!}
- MSSQL_PID=Developer
ports:
- "1433:1433"
volumes:
- sqlserver-data:/var/opt/mssql
networks:
- platform-network
healthcheck:
test: ["CMD-SHELL", "(echo > /dev/tcp/localhost/1433) >/dev/null 2>&1 || exit 1"]
interval: 10s
timeout: 5s
retries: 15
start_period: 45s
# MCP Server (Multi-Agent Orchestrator)
platform-mcp:
platform: linux/amd64
build:
context: .
dockerfile: src/Platform.Engineering.Copilot.Mcp/Dockerfile
target: final
image: platform-engineering-copilot-mcp:latest
container_name: pec-mcp
hostname: platform-mcp
restart: unless-stopped
depends_on:
sqlserver:
condition: service_healthy
environment:
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
- ASPNETCORE_URLS=http://0.0.0.0:5100
# Database
- ConnectionStrings__DefaultConnection=Server=sqlserver,1433;Database=PlatformDb;User=sa;Password=${SA_PASSWORD:-PlatformDB123!};TrustServerCertificate=true;MultipleActiveResultSets=true;Encrypt=false
- DatabaseProvider=SqlServer
# Azure Configuration
- AZURE_TENANT_ID=${AZURE_TENANT_ID:-}
- AZURE_CLIENT_ID=${AZURE_CLIENT_ID:-}
- AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET:-}
- AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID:-}
- Gateway__Azure__SubscriptionId=${AZURE_SUBSCRIPTION_ID:-}
- Gateway__Azure__TenantId=${AZURE_TENANT_ID:-}
- Gateway__Azure__CloudEnvironment=${AZURE_CLOUD_ENVIRONMENT:-AzureGovernment}
- Gateway__Azure__UseManagedIdentity=${AZURE_USE_MANAGED_IDENTITY:-false}
- Gateway__Azure__Enabled=${AZURE_ENABLED:-true}
# Azure OpenAI Configuration
- Gateway__AzureOpenAI__ApiKey=${AZURE_OPENAI_API_KEY:-}
- Gateway__AzureOpenAI__Endpoint=${AZURE_OPENAI_ENDPOINT:-https://mcp-ai.openai.azure.us/}
- Gateway__AzureOpenAI__DeploymentName=${AZURE_OPENAI_DEPLOYMENT:-gpt-4o}
- Gateway__AzureOpenAI__ChatDeploymentName=${AZURE_OPENAI_CHAT_DEPLOYMENT:-gpt-4o}
- Gateway__AzureOpenAI__EmbeddingDeploymentName=${AZURE_OPENAI_EMBEDDING_DEPLOYMENT:-text-embedding-ada-002}
# GitHub Configuration
- Gateway__GitHub__AccessToken=${GITHUB_TOKEN:-}
- Gateway__GitHub__Enabled=${GITHUB_ENABLED:-true}
# Git Sync Configuration
- GitSync__GitHubToken=${GITHUB_TOKEN:-}
- GitSync__AzureDevOpsToken=${AZURE_DEVOPS_TOKEN:-}
- GitSync__DefaultSyncIntervalMinutes=${GIT_SYNC_INTERVAL:-15}
- GitSync__AutoSyncEnabled=${GIT_AUTO_SYNC_ENABLED:-true}
ports:
- "5100:5100"
volumes:
- platform-logs:/app/logs
- ./appsettings.json:/app/appsettings.json:ro
- ~/.azure:/root/.azure:ro
networks:
- platform-network
# Admin API (Template & Environment Management)
platform-admin-api:
platform: linux/amd64
build:
context: .
dockerfile: src/Platform.Engineering.Copilot.Admin.API/Dockerfile
target: final
image: platform-engineering-copilot-admin-api:latest
container_name: pec-admin-api
hostname: platform-admin-api
restart: unless-stopped
depends_on:
sqlserver:
condition: service_healthy
platform-mcp:
condition: service_started
environment:
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
- ASPNETCORE_URLS=http://0.0.0.0:5050
# Database
- ConnectionStrings__DefaultConnection=Server=sqlserver,1433;Database=PlatformDb;User=sa;Password=${SA_PASSWORD:-PlatformDB123!};TrustServerCertificate=true;MultipleActiveResultSets=true;Encrypt=false
- DatabaseProvider=SqlServer
# Azure Configuration (for real deployments)
- AZURE_TENANT_ID=${AZURE_TENANT_ID:-}
- AZURE_CLIENT_ID=${AZURE_CLIENT_ID:-}
- AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET:-}
- AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID:-}
# Azure Government Cloud Authority (required for cross-cloud auth)
- AZURE_AUTHORITY_HOST=https://login.microsoftonline.us/
- Gateway__Azure__SubscriptionId=${AZURE_SUBSCRIPTION_ID:-}
- Gateway__Azure__TenantId=${AZURE_TENANT_ID:-}
- Gateway__Azure__CloudEnvironment=${AZURE_CLOUD_ENVIRONMENT:-AzureGovernment}
- Gateway__Azure__UseManagedIdentity=${AZURE_USE_MANAGED_IDENTITY:-false}
- Gateway__Azure__Enabled=${AZURE_ENABLED:-true}
# Deployment Configuration (UseGovernmentCloud must be true/false, not cloud name)
- Deployment__UseGovernmentCloud=${AZURE_USE_GOVERNMENT_CLOUD:-true}
- Deployment__DefaultStateStorageAccount=${TERRAFORM_STATE_STORAGE:-}
- Deployment__DefaultStateContainer=${TERRAFORM_STATE_CONTAINER:-terraform-state}
- Deployment__DefaultStateResourceGroup=${TERRAFORM_STATE_RG:-}
# CORS - Allow Admin Client
- Cors__AllowedOrigins=http://localhost:5002,http://platform-admin-client:80
# Azure OpenAI (for NL template matching)
- Gateway__AzureOpenAI__ApiKey=${AZURE_OPENAI_API_KEY:-}
- Gateway__AzureOpenAI__Endpoint=${AZURE_OPENAI_ENDPOINT:-https://mcp-ai.openai.azure.us/}
- Gateway__AzureOpenAI__DeploymentName=${AZURE_OPENAI_DEPLOYMENT:-gpt-4o}
# Git Sync Configuration
- GitSync__GitHubToken=${GITHUB_TOKEN:-}
- GitSync__AzureDevOpsToken=${AZURE_DEVOPS_TOKEN:-}
- GitSync__DefaultSyncIntervalMinutes=${GIT_SYNC_INTERVAL:-15}
- GitSync__AutoSyncEnabled=${GIT_AUTO_SYNC_ENABLED:-true}
- Logging__LogLevel__Default=Information
ports:
- "5050:5050"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5050/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
- platform-logs:/app/logs
- ~/.azure:/root/.azure:ro
networks:
- platform-network
# Admin Client (Blazor WASM Web UI)
platform-admin-client:
build:
context: .
dockerfile: src/Platform.Engineering.Copilot.Admin.Client/Dockerfile
target: final
image: platform-engineering-copilot-admin-client:latest
container_name: pec-admin-client
hostname: platform-admin-client
restart: unless-stopped
depends_on:
platform-admin-api:
condition: service_started
ports:
- "5002:80"
networks:
- platform-network