Add example environment files for new node setup

This commit is contained in:
aitbc
2026-04-15 10:25:33 +02:00
parent d342c2d5ab
commit 4b82d14fe0
2 changed files with 178 additions and 0 deletions

128
examples/env.example Normal file
View File

@@ -0,0 +1,128 @@
# AITBC Global Environment Configuration Template
# Copy this file to /etc/aitbc/.env and customize for your deployment
# This file contains global configuration shared across all nodes in the island
# =========================
# Core Environment
# =========================
NODE_ENV=production
DEBUG=false
LOG_LEVEL=INFO
# =========================
# Training Configuration
# =========================
TRAINING_MODE=true
TRAINING_STAGE=stage1_foundation
CLI_PATH=/opt/aitbc/aitbc-cli
LOG_DIR=/var/log/aitbc
WALLET_NAME=openclaw-trainee
WALLET_PASSWORD=trainee123
# =========================
# Service Ports (for training library)
# =========================
EXCHANGE_PORT=8000
COORDINATOR_PORT=8001
GENESIS_NODE_PORT=8006
FOLLOWER_NODE_PORT=8007
OLLAMA_PORT=11434
# =========================
# Blockchain Core
# =========================
chain_id=ait-testnet
supported_chains=ait-testnet,ait-devnet
db_path=/var/lib/aitbc/data/chain.db
rpc_bind_host=0.0.0.0
rpc_bind_port=8006
p2p_bind_host=0.0.0.0
p2p_bind_port=7070
# =========================
# Security
# =========================
SECRET_KEY=production-secret-key-change-me-in-production
JWT_SECRET=production-jwt-secret-32-chars-long
BLOCKCHAIN_API_KEY=production-api-key-change-me
# =========================
# Database
# =========================
DATABASE_URL=postgresql://aitbc:secure_password@localhost:5432/aitbc_prod
REDIS_URL=redis://localhost:6379/0
# =========================
# Monitoring
# =========================
PROMETHEUS_PORT=9090
GRAFANA_PORT=3000
MONITORING_PORT=9000
# =========================
# Paths
# =========================
BLOCKCHAIN_DATA_DIR=/var/lib/aitbc/data
BLOCKCHAIN_CONFIG_DIR=/etc/aitbc
BLOCKCHAIN_LOG_DIR=/var/log/aitbc/production
keystore_path=/var/lib/aitbc/keystore
keystore_password_file=/var/lib/aitbc/keystore/.password
# =========================
# Block Production
# =========================
enable_block_production=true
block_time_seconds=30
proposer_id=ait1ytkh0cn8v2a4zjwzyav6854832myf9j7unsse8yntmuwzst4qhtqe9hqdw
# Only propose blocks if mempool is not empty
propose_only_if_mempool_not_empty=true
# =========================
# Network Configuration
# =========================
NETWORK_ID=1337
CHAIN_ID=ait-testnet
CONSENSUS=proof_of_authority
gossip_backend=broadcast
gossip_broadcast_url=redis://localhost:6379
# =========================
# NAT Traversal (STUN/TURN)
# =========================
STUN_SERVERS=stun.l.google.com:19302,jitsi.bubuit.net:3478
TURN_SERVER=jitsi.bubuit.net:3478
# TURN_USERNAME and TURN_PASSWORD need to be configured if using TURN relay
# =========================
# Island Configuration (Federated Mesh)
# =========================
ISLAND_ID=test-island-001
ISLAND_NAME=Test Island
IS_HUB=true
ISLAND_CHAIN_ID=ait-testnet
HUB_DISCOVERY_URL=aitbc
BRIDGE_ISLANDS=
# =========================
# API Configuration
# =========================
API_VERSION=v1
API_PREFIX=/api/v1
RATE_LIMIT_REQUESTS_PER_MINUTE=1000
RATE_LIMIT_WINDOW_SECONDS=60
# =========================
# Feature Flags
# =========================
ENABLE_CACHING=true
ENABLE_METRICS=true
ENABLE_LOGGING=true
ENABLE_SECURITY_MONITORING=true
# =========================
# Training Specific
# =========================
TRAINING_TIMEOUT=300
GENESIS_NODE=http://localhost:8006
FOLLOWER_NODE=http://localhost:8007

50
examples/node.env.example Normal file
View File

@@ -0,0 +1,50 @@
# AITBC Node-Specific Environment Configuration Template
# Copy this file to /etc/aitbc/node.env and customize for each node
# This file contains variables unique to each node - DO NOT share across nodes
# =========================
# Node Identity
# =========================
# Unique identifier for this node (must be different for each node)
NODE_ID=aitbc
# =========================
# P2P Configuration
# =========================
# P2P node identity (must be unique for each node)
p2p_node_id=aitbc
# Proposer ID (PoA authority/block proposer)
# Each node should have its own unique proposer_id
proposer_id=ait1ytkh0cn8v2a4zjwzyav6854832myf9j7unsse8yntmuwzst4qhtqe9hqdw
# P2P Peers (comma-separated list of peer nodes)
# List other nodes in the network that this node should connect to
# Format: hostname:port (e.g., "aitbc1:7070,aitbc2:7070")
p2p_peers=aitbc1:7070
# =========================
# Trusted Propers
# =========================
# For follower nodes - list of trusted proposer addresses
# Leave empty for proposer nodes
trusted_proposers=
# =========================
# Node-Specific Host Bindings (optional)
# =========================
# Override default host bindings if needed for this specific node
# NODE_HOST=0.0.0.0
# NODE_PORT=7070
# =========================
# Setup Instructions
# =========================
# 1. Copy this template: cp /opt/aitbc/examples/node.env.example /etc/aitbc/node.env
# 2. Edit /etc/aitbc/node.env and set unique values for:
# - NODE_ID (unique per node)
# - p2p_node_id (unique per node)
# - proposer_id (unique per node)
# - p2p_peers (list other nodes in network)
# 3. Restart services: systemctl restart aitbc-blockchain-p2p
# 4. Verify connectivity: journalctl -fu aitbc-blockchain-p2p