chore: update file permissions to executable across repository
- Change file mode from 644 to 755 for all project files - Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet" - Rename Miner.extra_meta_data to extra_metadata for consistency
This commit is contained in:
431
docker-compose.yml
Normal file
431
docker-compose.yml
Normal file
@@ -0,0 +1,431 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Database Services
|
||||
postgres:
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_DB: aitbc
|
||||
POSTGRES_USER: aitbc
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-aitbc123}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U aitbc"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# Core Blockchain Services
|
||||
blockchain-node:
|
||||
build:
|
||||
context: ./apps/blockchain-node
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
ports:
|
||||
- "8007:8007"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./data/blockchain:/app/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8007/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
consensus-node:
|
||||
build:
|
||||
context: ./apps/consensus-node
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- BLOCKCHAIN_URL=http://blockchain-node:8007
|
||||
ports:
|
||||
- "8002:8002"
|
||||
depends_on:
|
||||
- blockchain-node
|
||||
volumes:
|
||||
- ./data/consensus:/app/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
network-node:
|
||||
build:
|
||||
context: ./apps/network-node
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- CONSENSUS_URL=http://consensus-node:8002
|
||||
ports:
|
||||
- "8008:8008"
|
||||
depends_on:
|
||||
- consensus-node
|
||||
volumes:
|
||||
- ./data/network:/app/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# Coordinator Services
|
||||
coordinator-api:
|
||||
build:
|
||||
context: ./apps/coordinator-api
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- BLOCKCHAIN_URL=http://blockchain-node:8007
|
||||
- CONSENSUS_URL=http://consensus-node:8002
|
||||
- NETWORK_URL=http://network-node:8008
|
||||
ports:
|
||||
- "8001:8001"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
blockchain-node:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# Production Services
|
||||
exchange-integration:
|
||||
build:
|
||||
context: ./apps/exchange-integration
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8010:8010"
|
||||
depends_on:
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8010/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
compliance-service:
|
||||
build:
|
||||
context: ./apps/compliance-service
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8011:8011"
|
||||
depends_on:
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8011/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
trading-engine:
|
||||
build:
|
||||
context: ./apps/trading-engine
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- EXCHANGE_URL=http://exchange-integration:8010
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8012:8012"
|
||||
depends_on:
|
||||
- exchange-integration
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8012/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# Plugin Ecosystem
|
||||
plugin-registry:
|
||||
build:
|
||||
context: ./apps/plugin-registry
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8013:8013"
|
||||
depends_on:
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8013/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
plugin-marketplace:
|
||||
build:
|
||||
context: ./apps/plugin-marketplace
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- PLUGIN_REGISTRY_URL=http://plugin-registry:8013
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8014:8014"
|
||||
depends_on:
|
||||
- plugin-registry
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8014/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
plugin-security:
|
||||
build:
|
||||
context: ./apps/plugin-security
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- PLUGIN_REGISTRY_URL=http://plugin-registry:8013
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8015:8015"
|
||||
depends_on:
|
||||
- plugin-registry
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8015/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
plugin-analytics:
|
||||
build:
|
||||
context: ./apps/plugin-analytics
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- PLUGIN_REGISTRY_URL=http://plugin-registry:8013
|
||||
- PLUGIN_MARKETPLACE_URL=http://plugin-marketplace:8014
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8016:8016"
|
||||
depends_on:
|
||||
- plugin-registry
|
||||
- plugin-marketplace
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8016/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# Global Infrastructure
|
||||
global-infrastructure:
|
||||
build:
|
||||
context: ./apps/global-infrastructure
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8017:8017"
|
||||
depends_on:
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8017/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
global-ai-agents:
|
||||
build:
|
||||
context: ./apps/global-ai-agents
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
- GLOBAL_INFRASTRUCTURE_URL=http://global-infrastructure:8017
|
||||
ports:
|
||||
- "8018:8018"
|
||||
depends_on:
|
||||
- coordinator-api
|
||||
- global-infrastructure
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8018/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
multi-region-load-balancer:
|
||||
build:
|
||||
context: ./apps/multi-region-load-balancer
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- GLOBAL_INFRASTRUCTURE_URL=http://global-infrastructure:8017
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8019:8019"
|
||||
depends_on:
|
||||
- global-infrastructure
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8019/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# Explorer
|
||||
explorer:
|
||||
build:
|
||||
context: ./apps/explorer
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://aitbc:${POSTGRES_PASSWORD:-aitbc123}@postgres:5432/aitbc
|
||||
- BLOCKCHAIN_URL=http://blockchain-node:8007
|
||||
- NETWORK_URL=http://network-node:8008
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
ports:
|
||||
- "8020:8020"
|
||||
depends_on:
|
||||
- blockchain-node
|
||||
- network-node
|
||||
- coordinator-api
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8020/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# CLI Container
|
||||
aitbc-cli:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: production
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- COORDINATOR_URL=http://coordinator-api:8001
|
||||
- BLOCKCHAIN_URL=http://blockchain-node:8007
|
||||
- EXCHANGE_URL=http://exchange-integration:8010
|
||||
- COMPLIANCE_URL=http://compliance-service:8011
|
||||
depends_on:
|
||||
- coordinator-api
|
||||
- blockchain-node
|
||||
- exchange-integration
|
||||
- compliance-service
|
||||
volumes:
|
||||
- ./data/cli:/home/aitbc/.aitbc
|
||||
entrypoint: ["tail", "-f", "/dev/null"]
|
||||
|
||||
# Monitoring
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- prometheus_data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||
- '--web.console.templates=/etc/prometheus/consoles'
|
||||
- '--storage.tsdb.retention.time=200h'
|
||||
- '--web.enable-lifecycle'
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources
|
||||
|
||||
# Reverse Proxy
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/ssl:/etc/nginx/ssl
|
||||
depends_on:
|
||||
- coordinator-api
|
||||
- exchange-integration
|
||||
- plugin-marketplace
|
||||
- explorer
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user