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
51 lines
1.7 KiB
Bash
51 lines
1.7 KiB
Bash
#!/bin/bash
|
|
|
|
# AITBC Services Deployment to Container
|
|
# Copy to deploy-to-container.sh and adjust variables for your environment
|
|
|
|
set -e
|
|
|
|
# === CONFIGURE THESE ===
|
|
CONTAINER_NAME="aitbc"
|
|
CONTAINER_IP="YOUR_CONTAINER_IP"
|
|
PROJECT_DIR="/path/to/your/aitbc"
|
|
SSH_ALIAS="your-ssh-alias" # or user@host
|
|
|
|
echo "🚀 Deploying AITBC services to container: $CONTAINER_NAME"
|
|
echo "Container IP: $CONTAINER_IP"
|
|
echo ""
|
|
|
|
# Colors for output
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
# 1. Push website
|
|
echo -e "${YELLOW}Deploying website...${NC}"
|
|
scp -r "$PROJECT_DIR/website/index.html" "$PROJECT_DIR/website/404.html" \
|
|
"$SSH_ALIAS:/var/www/html/"
|
|
scp -r "$PROJECT_DIR/website/docs/"*.html "$SSH_ALIAS:/var/www/html/docs/"
|
|
scp "$PROJECT_DIR/website/docs/css/docs.css" "$SSH_ALIAS:/var/www/html/docs/css/"
|
|
scp "$PROJECT_DIR/website/docs/js/theme.js" "$SSH_ALIAS:/var/www/html/docs/js/"
|
|
echo -e "${GREEN}✓ Website deployed${NC}"
|
|
|
|
# 2. Deploy coordinator API
|
|
echo -e "${YELLOW}Deploying coordinator API...${NC}"
|
|
ssh "$SSH_ALIAS" "cd /opt/aitbc && pip install -e apps/coordinator-api/"
|
|
ssh "$SSH_ALIAS" "systemctl restart aitbc-coordinator"
|
|
echo -e "${GREEN}✓ Coordinator deployed${NC}"
|
|
|
|
# 3. Deploy blockchain node
|
|
echo -e "${YELLOW}Deploying blockchain node...${NC}"
|
|
ssh "$SSH_ALIAS" "cd /opt/aitbc && pip install -e apps/blockchain-node/"
|
|
ssh "$SSH_ALIAS" "systemctl restart aitbc-blockchain"
|
|
echo -e "${GREEN}✓ Blockchain node deployed${NC}"
|
|
|
|
# 4. Verify
|
|
echo ""
|
|
echo -e "${YELLOW}Verifying services...${NC}"
|
|
ssh "$SSH_ALIAS" "curl -s http://127.0.0.1:8000/v1/health | head -1"
|
|
ssh "$SSH_ALIAS" "curl -s http://127.0.0.1:9080/rpc/health | head -1"
|
|
echo -e "${GREEN}✓ All services running${NC}"
|