3.1 KiB
3.1 KiB
TeleBot Deployment Instructions - Hostinger Server
🚀 Quick Deployment (Manual SSH)
Since SSH automation is not working from this environment, please follow these manual steps to deploy TeleBot with the latest source code:
Step 1: SSH to the Hostinger Server
ssh -p 2255 root@srv1002428.hstgr.cloud
Step 2: Run the Deployment Script
Once logged into the server, run these commands:
# Navigate to the opt directory
cd /opt
# Clone or update the repository
if [ -d "LittleShop" ]; then
cd LittleShop
git pull origin main
else
git clone https://git.silverlabs.uk/SilverLABS/LittleShop.git
cd LittleShop
fi
# Run the deployment script
chmod +x telebot-server-deploy.sh
./telebot-server-deploy.sh
📋 What the Script Does
The telebot-server-deploy.sh script will:
-
Pull Latest Code - Gets all recent commits including:
-
Build from Source - Creates a fresh Docker image from source code (not pre-compiled binaries)
-
Deploy Container - Runs TeleBot with proper configuration:
- Connected to
littleshop-networkfor API communication - Proper environment variables for production
- Volume mounts for logs and data persistence
- Connected to
🔍 Verification
After deployment, verify TeleBot is running correctly:
# Check container status
docker ps | grep telebot
# View recent logs
docker logs --tail 50 telebot
# Monitor live logs
docker logs -f telebot
✅ Expected Results
After successful deployment, you should see:
- TeleBot container running
- Logs showing "Bot started successfully" or similar
- No compilation errors
- Connection to LittleShop API established
🐛 Troubleshooting
If the container fails to start:
# Check detailed logs
docker logs telebot
# Verify network connectivity
docker network ls | grep littleshop
docker network inspect littleshop-network
# Ensure LittleShop Admin is running
docker ps | grep littleshop-admin
# Check if old container is blocking
docker ps -a | grep telebot
docker rm telebot # if needed
📦 What's Been Fixed
The new deployment includes all these fixes:
- Duplicate /review command - Fixed compilation error
- Shipping address collection - No longer asks multiple times
- Network connectivity - Proper Docker network configuration
- API communication - Fixed connection to LittleShop Admin
- Error handling - Improved error messages and logging
🎯 Current Status
- Dockerfile: ✅ Ready (builds from source)
- docker-compose.hostinger.yml: ✅ Created
- Deployment script: ✅ Created (telebot-server-deploy.sh)
- Git repository: ✅ Updated with all files
- Awaiting: Manual SSH execution of deployment script
📝 Notes
- The bot token is already configured in the script
- The script creates all necessary directories and permissions
- Old containers and images are automatically cleaned up
- The deployment is idempotent (safe to run multiple times)