Skip to main content

On VM Deployment Architecture (GCP)

This page describes the infrastructure and application architecture of CodeMie On VM on GCP.

Infrastructure Overview

GCP On VM Infrastructure Architecture

CodeMie On VM runs on a single GCE VM with supporting GCP services. Terraform provisions the following resources:

ResourcePurpose
GCE VM (n2-highmem-4)Single VM running Docker Compose (4 vCPU, 32 GB RAM)
VPC / SubnetIsolated network for the VM
Firewall RulesControls inbound/outbound traffic to the VM
GCS BucketPersistent storage for user data (repos, files)
Cloud KMS KeyEncryption key management for storage data
Cloud DNS Private ZoneCustom domain resolution (when TF_VAR_platform_domain_name is set)
IAP (Identity-Aware Proxy)Secure SSH access to the VM without exposing a public IP
Secret ManagerStores the SSH private key for VM access

Network Modes

ModeConfigurationAccess
Private IP (default)TF_VAR_platform_domain_name emptyVM private IP, access via VPN or IAP
DomainTF_VAR_platform_domain_name="codemie.internal"Creates Cloud DNS private zone, access via name

Application Architecture

All CodeMie services run as Docker containers on the GCE VM, orchestrated by Docker Compose.

Docker Compose Services

Services by Profile

Shared services (both profiles):

ServiceImagePurpose
postgrespgvector/pgvector:pg17Primary database for application data
elasticsearchelasticsearch:8.xDocument storage and search for Data Sources
kibanakibana:8.xLog visualization and analytics for Elasticsearch
mcp-connectcodemie-mcp-connect-serviceConnector for MCP servers
nginxnginx:1.31-alpineReverse proxy, TLS termination

OSS profile:

ServicePurpose
codemie-ossAPI server with built-in local authentication
codemie-ui-ossWeb frontend

Enterprise profile:

ServicePurpose
codemieAPI server
codemie-uiWeb frontend
keycloakIdentity provider (SSO, OIDC)
oauth2-proxyAuthentication proxy in front of nginx
litellmLLM proxy for model routing and key management
natsMessaging for plugin engine
nats-auth-calloutNATS authentication service
mermaid-serverDiagram rendering

Resource Requirements

Minimum GCE VM

ResourceMinimumRecommended
vCPU44 (n2-highmem-4)
RAM16 GB32 GB
Disk50 GB100 GB

Next Steps

  • Deployment — Deploy CodeMie On VM with Terraform