MCP Blockchain Server

version: '3.8' services: # PostgreSQL database postgres: image: postgres:16-alpine container_name: mcp-postgres restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_DB: ${POSTGRES_DB:-mcp_blockchain} volumes: - postgres-data:/var/lib/postgresql/data ports: - "5432:5432" networks: - mcp-network healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 # Redis for caching redis: image: redis:7-alpine container_name: mcp-redis restart: unless-stopped volumes: - redis-data:/data ports: - "6379:6379" networks: - mcp-network healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 # MCP Blockchain Server server: build: context: . dockerfile: Dockerfile container_name: mcp-server restart: unless-stopped depends_on: postgres: condition: service_healthy redis: condition: service_healthy environment: - NODE_ENV=production - PORT=3000 - DATABASE_URL=postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-mcp_blockchain} - REDIS_URL=redis://redis:6379 - JWT_SECRET=${JWT_SECRET:-ChangeMeToASecureSecret} - JWT_EXPIRES_IN=1d - INFURA_API_KEY=${INFURA_API_KEY} - ETHERSCAN_API_KEY=${ETHERSCAN_API_KEY} - WEB_DAPP_URL=${WEB_DAPP_URL:-http://localhost:3001} ports: - "3000:3000" networks: - mcp-network volumes: - ./logs:/app/logs # Web DApp web: build: context: ./web dockerfile: Dockerfile container_name: mcp-web restart: unless-stopped depends_on: - server environment: - REACT_APP_API_URL=http://localhost:3000/api/v1 ports: - "3001:3001" networks: - mcp-network # Volumes volumes: postgres-data: redis-data: # Networks networks: mcp-network: driver: bridge