-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
127 lines (121 loc) · 4.75 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
127 lines (121 loc) · 4.75 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
# ethpandaops Panda Server - Docker Compose Configuration
#
# Architecture:
# 1. Proxy service - holds credentials, proxies requests from sandbox containers
# 2. Panda server - connects to proxy, runs sandbox containers
#
# Usage:
# docker compose up -d # Start all services
# docker compose logs -f ethpandaops-panda-server # View server logs
#
# Optional environment variables (with defaults):
# MCP_PROXY_HOST - Host interface for published proxy port (default: 127.0.0.1)
# MCP_SERVER_HOST - Host interface for published server + metrics ports (default: 127.0.0.1)
# MCP_SERVER_PORT - MCP server port (default: 2480)
# MCP_METRICS_PORT - Metrics port (default: 31490)
services:
# Build-only service to ensure sandbox image is available
# This runs "true" and exits immediately - we just need the image built
sandbox-builder:
build:
context: .
dockerfile: sandbox/Dockerfile
image: ethpandaops-panda-sandbox:latest
command: "true"
restart: "no"
# Credential proxy - holds datasource credentials
ethpandaops-panda-proxy:
build:
context: .
dockerfile: Dockerfile
args:
- VERSION=${VERSION:-dev}
- GIT_COMMIT=${GIT_COMMIT:-unknown}
- BUILD_TIME=${BUILD_TIME:-unknown}
entrypoint: ["/app/panda-proxy"]
command: ["--config", "/config/proxy-config.yaml"]
ports:
- "${MCP_PROXY_HOST:-127.0.0.1}:18081:18081" # Proxy for local clients
- "${MCP_PROXY_HOST:-127.0.0.1}:${MCP_PROXY_METRICS_PORT:-9090}:9090" # Proxy metrics
env_file:
- path: .env
environment:
# ClickHouse - Xatu cluster
- CLICKHOUSE_XATU_HOST=${CLICKHOUSE_XATU_HOST}
- CLICKHOUSE_XATU_DATABASE=${CLICKHOUSE_XATU_DATABASE}
- CLICKHOUSE_XATU_USERNAME=${CLICKHOUSE_XATU_USERNAME}
- CLICKHOUSE_XATU_PASSWORD=${CLICKHOUSE_XATU_PASSWORD}
# ClickHouse - Refined cluster
- CLICKHOUSE_REFINED_HOST=${CLICKHOUSE_REFINED_HOST}
- CLICKHOUSE_REFINED_DATABASE=${CLICKHOUSE_REFINED_DATABASE}
- CLICKHOUSE_REFINED_USERNAME=${CLICKHOUSE_REFINED_USERNAME}
- CLICKHOUSE_REFINED_PASSWORD=${CLICKHOUSE_REFINED_PASSWORD}
# Prometheus - Platform
- PROMETHEUS_PLATFORM_URL=${PROMETHEUS_PLATFORM_URL}
- PROMETHEUS_PLATFORM_USERNAME=${PROMETHEUS_PLATFORM_USERNAME}
- PROMETHEUS_PLATFORM_PASSWORD=${PROMETHEUS_PLATFORM_PASSWORD}
# Prometheus - Devnets
- PROMETHEUS_DEVNETS_URL=${PROMETHEUS_DEVNETS_URL}
- PROMETHEUS_DEVNETS_USERNAME=${PROMETHEUS_DEVNETS_USERNAME}
- PROMETHEUS_DEVNETS_PASSWORD=${PROMETHEUS_DEVNETS_PASSWORD}
# Loki
- LOKI_URL=${LOKI_URL}
- LOKI_USERNAME=${LOKI_USERNAME}
- LOKI_PASSWORD=${LOKI_PASSWORD}
# Ethereum node API (beacon/execution)
- ETHPANDAOPS_ETHNODE_USERNAME=${ETHPANDAOPS_ETHNODE_USERNAME}
- ETHPANDAOPS_ETHNODE_PASSWORD=${ETHPANDAOPS_ETHNODE_PASSWORD}
volumes:
- ./proxy-config.yaml:/config/proxy-config.yaml:ro
networks:
- ethpandaops-panda-external
- ethpandaops-panda-internal
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "18081"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
# Panda server - connects to proxy
ethpandaops-panda-server:
build:
context: .
dockerfile: Dockerfile
args:
- VERSION=${VERSION:-dev}
- GIT_COMMIT=${GIT_COMMIT:-unknown}
- BUILD_TIME=${BUILD_TIME:-unknown}
ports:
- "${MCP_SERVER_HOST:-127.0.0.1}:${MCP_SERVER_PORT:-2480}:2480" # MCP server
- "${MCP_SERVER_HOST:-127.0.0.1}:${MCP_METRICS_PORT:-31490}:2490" # Metrics
environment:
- CONFIG_PATH=/config/config.yaml
volumes:
- ./config.yaml:/config/config.yaml:ro
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/ethpandaops-panda-sandbox:/tmp/ethpandaops-panda-sandbox # Shared with sandbox containers
- panda-storage:/data/storage # Local file storage
- panda-cache:/data/cache # Local embedding vector cache
networks:
- ethpandaops-panda-external
- ethpandaops-panda-internal
depends_on:
sandbox-builder:
condition: service_completed_successfully
ethpandaops-panda-proxy:
condition: service_healthy
restart: unless-stopped
networks:
# External network - accessible from outside
ethpandaops-panda-external:
name: ethpandaops-panda-external # Prevent project-name prefix
driver: bridge
# Network for sandbox containers to reach datasources.
# Not marked internal so containers can resolve external DNS for
# ClickHouse, Prometheus, and Loki connections.
ethpandaops-panda-internal:
name: ethpandaops-panda-internal # Prevent project-name prefix
driver: bridge
volumes:
panda-storage:
panda-cache: