chore: Organize workspace structure - move docs, workflows, scripts to subdirectories
Organization: - Created docs/ with setup/, guides/, history/ subdirectories - Created workflows/ with trading/, analytics/, telegram/, archive/ subdirectories - Created scripts/ with docker/, setup/, testing/ subdirectories - Created tests/ for TypeScript test files - Created archive/ for unused reference files Moved files: - 17 documentation files → docs/ - 16 workflow JSON files → workflows/ - 10 shell scripts → scripts/ - 4 test files → tests/ - 5 unused files → archive/ Updated: - README.md with new file structure and documentation paths Deleted: - data/ (empty directory) - screenshots/ (empty directory) Critical files remain in root: - telegram_command_bot.py (active bot - used by Dockerfile) - watch-restart.sh (systemd service dependency) - All Dockerfiles and docker-compose files - All environment files Validation: Containers running (trading-bot-v4, telegram-trade-bot, postgres) API responding (positions endpoint tested) Telegram bot functional (/status command tested) All critical files present in root No code changes - purely organizational. System continues running without interruption. Recovery: git revert HEAD or git reset --hard cleanup-before
This commit is contained in:
64
scripts/setup/complete_telegram_setup.sh
Executable file
64
scripts/setup/complete_telegram_setup.sh
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# Complete Telegram Trading Bot Setup
|
||||
|
||||
echo "🤖 Telegram Trading Bot - Complete Setup"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Step 1: Check if workflow is imported
|
||||
echo "📋 Step 1: n8n Workflow"
|
||||
echo "-----------------------"
|
||||
echo "1. Open n8n: http://10.0.0.48:8098"
|
||||
echo "2. Import telegram-manual-trade-FINAL.json"
|
||||
echo "3. Connect the last node '➡️ Connect to Check Risk Node' to your Money Machine's 'Check Risk' node"
|
||||
echo "4. Activate the workflow"
|
||||
echo ""
|
||||
read -p "Done? (y/n) " -n 1 -r
|
||||
echo ""
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "❌ Complete step 1 first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Step 2: Get bot token
|
||||
echo ""
|
||||
echo "🤖 Step 2: Telegram Bot Token"
|
||||
echo "------------------------------"
|
||||
echo "Run: ./GET_BOT_TOKEN.sh for instructions"
|
||||
echo ""
|
||||
echo "Or if you already have a bot token:"
|
||||
read -p "Paste your bot token here: " BOT_TOKEN
|
||||
|
||||
if [ -z "$BOT_TOKEN" ]; then
|
||||
echo "❌ Bot token required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update .env file
|
||||
sed -i "s|TELEGRAM_BOT_TOKEN=.*|TELEGRAM_BOT_TOKEN=$BOT_TOKEN|" .env.telegram-bot
|
||||
|
||||
echo "✅ Bot token saved to .env.telegram-bot"
|
||||
|
||||
# Step 3: Build and start
|
||||
echo ""
|
||||
echo "🚀 Step 3: Starting Telegram Bot Container"
|
||||
echo "-------------------------------------------"
|
||||
|
||||
docker-compose -f docker-compose.telegram-bot.yml --env-file .env.telegram-bot up -d --build
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo ""
|
||||
echo "✅ SUCCESS! Telegram bot is running!"
|
||||
echo ""
|
||||
echo "📱 Test it now:"
|
||||
echo " Open Telegram and send to your chat (579304651):"
|
||||
echo " • buy sol"
|
||||
echo " • sell btc"
|
||||
echo " • buy eth"
|
||||
echo ""
|
||||
echo "📊 View logs: docker logs -f telegram-trade-bot"
|
||||
echo ""
|
||||
else
|
||||
echo "❌ Failed to start container"
|
||||
echo "Check logs: docker logs telegram-trade-bot"
|
||||
fi
|
||||
Reference in New Issue
Block a user