-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (66 loc) · 3.11 KB
/
docker-compose.yml
File metadata and controls
76 lines (66 loc) · 3.11 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
version: '3.8'
services:
structs-mcp:
build:
context: .
dockerfile: Dockerfile
image: structs-mcp-server:latest
container_name: structs-mcp-server
restart: unless-stopped
# Mount AI documentation directory (optional)
# If mounted, this overrides the baked-in compendium at /app/data/structs-ai
# If not mounted, the image will use the baked-in compendium by default
volumes:
- ../../ai:/app/ai:ro # Read-only mount of AI docs (comment out to use baked-in compendium)
# Environment variables
environment:
- NODE_ENV=production
# AI_DOCS_PATH: Use /app/ai if volume is mounted, or /app/data/structs-ai for baked-in compendium
# If volume is mounted above, keep this as /app/ai. Otherwise, remove this line to use the default.
- AI_DOCS_PATH=/app/ai
# Use host.docker.internal to access services on the host machine
# For services in Docker Compose, use service names instead
- CONSENSUS_RPC_URL=${CONSENSUS_RPC_URL:-http://host.docker.internal:26657}
- CONSENSUS_API_URL=${CONSENSUS_API_URL:-http://host.docker.internal:1317}
- WEBAPP_API_URL=${WEBAPP_API_URL:-http://host.docker.internal:8080}
- NATS_URL=${NATS_URL:-nats://host.docker.internal:4222}
- NATS_WEBSOCKET_URL=${NATS_WEBSOCKET_URL:-ws://host.docker.internal:1443}
# Database (required for transaction submission and player creation)
- DATABASE_URL=${DATABASE_URL:-postgresql://user:password@host.docker.internal:5432/structs}
# Database access control:
# - When DANGER=true: enable database-backed transactions (write operations)
# - When DANGER=false (default): run in read-only mode via APIs only
- DANGER=${DANGER:-false}
# Proof-of-work configuration (see README and AGE-CALCULATION-AUTOMATIC.md)
- TARGET_DIFFICULTY_START=${TARGET_DIFFICULTY_START:-5}
# References feature (optional; defaults keep it disabled but discoverable)
- REFERENCES_ENABLED=${REFERENCES_ENABLED:-false}
- MCP_TRANSPORT=${MCP_TRANSPORT:-stdio}
- MCP_HTTP_PORT=${MCP_HTTP_PORT:-3000}
- MCP_HTTP_HOST=${MCP_HTTP_HOST:-0.0.0.0}
# Use bridge network (default) - host.docker.internal works on Mac/Windows
# For Linux, you may need to use network_mode: host or add extra_hosts
# network_mode: host # Uncomment for Linux if host.docker.internal doesn't work
extra_hosts:
- "host.docker.internal:host-gateway" # Linux compatibility
# Ports (for HTTP transport mode)
ports:
- "${MCP_HTTP_PORT:-3000}:3000" # Expose HTTP port if using HTTP transport
# stdio support (for stdio transport mode)
stdin_open: true # Keep STDIN open (required for stdio MCP)
tty: true # Allocate a pseudo-TTY (required for stdio MCP)
# User
user: "1001:1001" # Non-root user (mcp user from Dockerfile)
# Resource limits
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
# Uncomment if using bridge network
# networks:
# structs-network:
# external: true