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:
2026-03-19 12:59:34 +01:00
committed by aitbc
parent 5f2ab48b9a
commit b4b5a57390
111 changed files with 13106 additions and 346 deletions

View File

@@ -0,0 +1,66 @@
#!/bin/bash
# Deploy AITBC Explorer to the server
set -e
SERVER="root@10.1.223.93"
EXPLORER_DIR="/root/aitbc/apps/explorer-web"
NGINX_CONFIG="/etc/nginx/sites-available/aitbc"
echo "🚀 Deploying AITBC Explorer to Server"
echo "====================================="
echo "Server: $SERVER"
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"
}
# Build the explorer locally first
print_status "Building explorer locally..."
cd /home/oib/windsurf/aitbc/apps/explorer-web
npm run build
# Copy built files to server
print_status "Copying explorer build to server..."
scp -r dist $SERVER:$EXPLORER_DIR/
# Update nginx config to include explorer
print_status "Updating nginx configuration..."
# Backup current config
ssh $SERVER "cp $NGINX_CONFIG ${NGINX_CONFIG}.backup"
# Add explorer location to nginx config
ssh $SERVER "sed -i '/# Health endpoint/i\\
# Explorer\\
location /explorer/ {\\
alias /root/aitbc/apps/explorer-web/dist/;\\
try_files \$uri \$uri/ /explorer/index.html;\\
}\\
\\
# Explorer mock data\\
location /explorer/mock/ {\\
alias /root/aitbc/apps/explorer-web/public/mock/;\\
}\\
' $NGINX_CONFIG"
# Test and reload nginx
print_status "Testing and reloading nginx..."
ssh $SERVER "nginx -t && systemctl reload nginx"
print_status "✅ Explorer deployment complete!"
echo ""
echo "📋 Explorer URL:"
echo " 🌐 Explorer: https://aitbc.bubuit.net/explorer/"
echo ""