services:
mcp-claude-code:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspaces/siai:cached
- /var/run/docker.sock:/var/run/docker.sock
- vscode-home:/home/vscode
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
environment:
- MCP_DATABASE_PATH=/workspaces/siai/data/sessions.db
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
server:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspaces/siai:cached
# Overrides default command so things don't shut down after the process ends.
working_dir: /workspaces/siai
command: npm run mcp:http:watch -- --no-auth
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
ports:
- 3050:3050
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_SERVICE_NAME=siai-api
- OTEL_TRACES_SAMPLER=always_on
- MCP_DATABASE_PATH=/workspaces/siai/data/sessions.db
# Client dev server runs in the same container
loki:
image: grafana/loki:3.0.0
restart: unless-stopped
volumes:
- loki-data:/loki
command: -config.file=/etc/loki/local-config.yaml
# Add "forwardPorts": ["3100"] to **devcontainer.json** to forward Loki locally.
alloy:
image: grafana/alloy:latest
restart: unless-stopped
volumes:
- ./alloy-config.yaml:/etc/alloy/config.alloy:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
command: run --server.http.listen-addr=0.0.0.0:12345 /etc/alloy/config.alloy
depends_on:
- loki
# Add "forwardPorts": ["12345"] to **devcontainer.json** to forward Alloy UI locally.
tempo:
image: grafana/tempo:2.6.0
restart: unless-stopped
volumes:
- tempo-data:/var/tempo
entrypoint:
- sh
- -euc
- |
cat > /tmp/tempo.yaml <<EOF
server:
http_listen_port: 3200
grpc_listen_port: 9096
distributor:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
ingester:
max_block_duration: 5m
compactor:
compaction:
block_retention: 336h
metrics_generator:
registry:
external_labels:
source: tempo
storage:
path: /var/tempo/generator/wal
storage:
trace:
backend: local
wal:
path: /var/tempo/wal
local:
path: /var/tempo/traces
overrides:
metrics_generator_processors: [service-graphs, span-metrics]
EOF
exec /tempo -config.file=/tmp/tempo.yaml
# Add "forwardPorts": ["3200", "4317", "4318"] to **devcontainer.json** to forward Tempo locally.
# Port 3200: Tempo HTTP API
# Port 4317: OpenTelemetry gRPC receiver
# Port 4318: OpenTelemetry HTTP receiver
prometheus:
image: prom/prometheus:v2.48.0
restart: unless-stopped
volumes:
- prometheus-data:/prometheus
entrypoint:
- sh
- -c
- |
cat > /etc/prometheus/prometheus.yml << 'EOF'
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: "siai-api"
static_configs:
- targets: ["localhost:7878"]
labels:
service: "siai-api"
- job_name: "siai-worker"
static_configs:
- targets: ["localhost:7879"]
labels:
service: "siai-worker"
EOF
exec /bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles --web.listen-address=0.0.0.0:9090
# Add "forwardPorts": ["9090"] to **devcontainer.json** to forward Prometheus locally.
grafana:
image: grafana/grafana:10.4.1
restart: unless-stopped
volumes:
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=false
depends_on:
- loki
- tempo
- prometheus
# Add "forwardPorts": ["3000"] to **devcontainer.json** to forward Grafana locally.
networks:
kadre-dev:
external: true
volumes:
vscode-home:
loki-data:
grafana-data:
tempo-data:
prometheus-data: