littleshop/build-telebot.sh
SysAdmin 127be759c8 Refactor payment verification to manual workflow and add comprehensive cleanup tools
Major changes:
• Remove BTCPay Server integration in favor of SilverPAY manual verification
• Add test data cleanup mechanisms (API endpoints and shell scripts)
• Fix compilation errors in TestController (IdentityReference vs CustomerIdentity)
• Add deployment automation scripts for Hostinger VPS
• Enhance integration testing with comprehensive E2E validation
• Add Blazor components and mobile-responsive CSS for admin interface
• Create production environment configuration scripts

Key Features Added:
• Manual payment verification through Admin panel Order Details
• Bulk test data cleanup with proper cascade handling
• Deployment automation with systemd service configuration
• Comprehensive E2E testing suite with SilverPAY integration validation
• Mobile-first admin interface improvements

Security & Production:
• Environment variable configuration for production secrets
• Proper JWT and VAPID key management
• SilverPAY API integration with live credentials
• Database cleanup and maintenance tools

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 19:29:00 +01:00

61 lines
1.9 KiB
Bash

#!/bin/bash
# TeleBot Build Script
# This script builds TeleBot Docker image with the correct Dockerfile
set -e
echo "================================================"
echo "🤖 Building TeleBot Docker Image"
echo "================================================"
echo ""
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Navigate to project root
cd "$(dirname "$0")"
echo -e "${YELLOW}Step 1: Building TeleBot image...${NC}"
docker build -t telebot:latest -f Dockerfile.telebot . || {
echo -e "${RED}Error: Failed to build TeleBot${NC}"
echo "Make sure you're running this from /opt/LittleShop or /opt/littleshop"
exit 1
}
echo -e "${GREEN}✓ TeleBot built successfully${NC}"
echo ""
echo -e "${YELLOW}Step 2: Tagging for registry...${NC}"
docker tag telebot:latest localhost:5000/telebot:latest
echo -e "${GREEN}✓ Tagged as localhost:5000/telebot:latest${NC}"
echo ""
echo -e "${YELLOW}Step 3: Pushing to registry...${NC}"
docker push localhost:5000/telebot:latest || {
echo -e "${YELLOW}⚠ Failed to push to registry (registry might be down)${NC}"
echo "You can still use the local image"
}
echo ""
echo -e "${YELLOW}Step 4: Restarting TeleBot container...${NC}"
if [ -f "docker-compose.telebot.yml" ]; then
docker-compose -f docker-compose.telebot.yml down
docker-compose -f docker-compose.telebot.yml up -d
echo -e "${GREEN}✓ TeleBot restarted with new image${NC}"
else
docker restart telebot || echo -e "${YELLOW}⚠ Container restart failed, may need manual intervention${NC}"
fi
echo ""
echo "================================================"
echo -e "${GREEN}✅ TeleBot Build Complete!${NC}"
echo "================================================"
echo ""
echo "To check status:"
echo " docker ps | grep telebot"
echo " docker logs --tail 50 telebot"
echo ""
echo "Note: This script uses Dockerfile.telebot which avoids path issues"