Some checks failed
AITBC CI/CD Pipeline / lint-and-test (3.11) (push) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.12) (push) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.13) (push) Has been cancelled
AITBC CI/CD Pipeline / test-cli (push) Has been cancelled
AITBC CI/CD Pipeline / test-services (push) Has been cancelled
AITBC CI/CD Pipeline / test-production-services (push) Has been cancelled
AITBC CI/CD Pipeline / security-scan (push) Has been cancelled
AITBC CI/CD Pipeline / build (push) Has been cancelled
AITBC CI/CD Pipeline / deploy-staging (push) Has been cancelled
AITBC CI/CD Pipeline / deploy-production (push) Has been cancelled
AITBC CI/CD Pipeline / performance-test (push) Has been cancelled
AITBC CI/CD Pipeline / docs (push) Has been cancelled
AITBC CI/CD Pipeline / release (push) Has been cancelled
AITBC CI/CD Pipeline / notify (push) Has been cancelled
Security Scanning / Bandit Security Scan (apps/coordinator-api/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (cli/aitbc_cli) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-core/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-crypto/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-sdk/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (tests) (push) Has been cancelled
Security Scanning / CodeQL Security Analysis (javascript) (push) Has been cancelled
Security Scanning / CodeQL Security Analysis (python) (push) Has been cancelled
Security Scanning / Dependency Security Scan (push) Has been cancelled
Security Scanning / Container Security Scan (push) Has been cancelled
Security Scanning / OSSF Scorecard (push) Has been cancelled
Security Scanning / Security Summary Report (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.11) (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.12) (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.13) (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-summary (push) Has been cancelled
- Remove debugging service documentation (DEBUgging_SERVICES.md) - Remove development logs policy and quick reference guides - Remove E2E test creation summary - Remove gift certificate example file - Remove GitHub pull summary documentation
75 lines
2.0 KiB
Bash
Executable File
75 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Deploy AITBC Trade Exchange to the server
|
|
|
|
set -e
|
|
|
|
SERVER="root@10.1.223.93"
|
|
EXCHANGE_DIR="/root/aitbc/apps/trade-exchange"
|
|
|
|
echo "🚀 Deploying AITBC Trade Exchange"
|
|
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"
|
|
}
|
|
|
|
# Test SSH connection
|
|
print_status "Testing SSH connection..."
|
|
ssh $SERVER "hostname && ip a show eth0 | grep inet"
|
|
|
|
# Copy updated files
|
|
print_status "Copying updated Exchange files..."
|
|
scp /home/oib/windsurf/aitbc/apps/trade-exchange/index.html $SERVER:$EXCHANGE_DIR/
|
|
scp /home/oib/windsurf/aitbc/apps/trade-exchange/server.py $SERVER:$EXCHANGE_DIR/
|
|
|
|
# Ensure assets are available
|
|
print_status "Ensuring assets directory exists..."
|
|
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets"
|
|
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets/css"
|
|
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets/js"
|
|
|
|
# Copy assets if they don't exist
|
|
print_status "Copying assets if needed..."
|
|
if ! ssh $SERVER "test -f /var/www/aitbc.bubuit.net/assets/css/aitbc.css"; then
|
|
scp -r /home/oib/windsurf/aitbc/assets/* $SERVER:/var/www/aitbc.bubuit.net/assets/
|
|
fi
|
|
|
|
# Restart the exchange service
|
|
print_status "Restarting Trade Exchange service..."
|
|
ssh $SERVER "systemctl restart aitbc-exchange"
|
|
|
|
# Wait for service to start
|
|
print_status "Waiting for service to start..."
|
|
sleep 5
|
|
|
|
# Check service status
|
|
print_status "Checking service status..."
|
|
ssh $SERVER "systemctl status aitbc-exchange --no-pager -l | head -10"
|
|
|
|
# Test the endpoint
|
|
print_status "Testing Exchange endpoint..."
|
|
ssh $SERVER "curl -s http://127.0.0.1:3002/ | head -c 100"
|
|
echo ""
|
|
|
|
echo ""
|
|
print_status "✅ Exchange deployment complete!"
|
|
echo ""
|
|
echo "📋 URLs:"
|
|
echo " 🌐 IP: http://10.1.223.93/Exchange"
|
|
echo " 🔒 Domain: https://aitbc.bubuit.net/Exchange"
|
|
echo ""
|
|
echo "🔍 To check logs:"
|
|
echo " ssh $SERVER 'journalctl -u aitbc-exchange -f'"
|