refactor: clean up configuration and add production infrastructure
- Add .aitbc.yaml configuration file with test values - Simplify .gitignore by removing merge conflicts and redundant entries - Reorganize .gitignore sections for better clarity - Set chain_id and proposer_id to empty strings in config.py (require explicit configuration) - Add production Helm values configuration - Add production nginx configuration - Update environment variable handling in chain settings
This commit is contained in:
56
scripts/deploy/deploy-modern-explorer.sh
Normal file
56
scripts/deploy/deploy-modern-explorer.sh
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deploy Modern Blockchain Explorer
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Deploying Modern Blockchain Explorer"
|
||||
echo "======================================"
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
|
||||
print_status() {
|
||||
echo -e "${GREEN}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}[WARN]${NC} $1"
|
||||
}
|
||||
|
||||
# Stop existing services
|
||||
print_status "Stopping existing services..."
|
||||
systemctl stop nginx 2>/dev/null || true
|
||||
|
||||
# Create directory
|
||||
print_status "Creating explorer directory..."
|
||||
rm -rf /opt/blockchain-explorer
|
||||
mkdir -p /opt/blockchain-explorer/assets
|
||||
|
||||
# Copy files
|
||||
print_status "Copying explorer files..."
|
||||
cp -r /opt/blockchain-node-src/apps/blockchain-explorer/* /opt/blockchain-explorer/
|
||||
|
||||
# Update nginx configuration
|
||||
print_status "Updating nginx configuration..."
|
||||
cp /opt/blockchain-explorer/nginx.conf /etc/nginx/sites-available/blockchain-explorer
|
||||
ln -sf /etc/nginx/sites-available/blockchain-explorer /etc/nginx/sites-enabled/
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
|
||||
# Test and start nginx
|
||||
print_status "Starting nginx..."
|
||||
nginx -t
|
||||
systemctl start nginx
|
||||
|
||||
print_success "✅ Modern explorer deployed!"
|
||||
echo ""
|
||||
echo "Access URLs:"
|
||||
echo " - Explorer: http://localhost:3000/"
|
||||
echo " - API: http://localhost:3000/api/v1/"
|
||||
echo ""
|
||||
echo "Standardized API Endpoints:"
|
||||
echo " - GET /api/v1/chain/head"
|
||||
echo " - GET /api/v1/chain/blocks?limit=N"
|
||||
echo " - GET /api/v1/chain/blocks/{height}"
|
||||
Reference in New Issue
Block a user