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
37 lines
820 B
Bash
Executable File
37 lines
820 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Trading Bot v4 - Docker Build Script
|
|
# Builds production-ready Docker image
|
|
|
|
set -e
|
|
|
|
echo "🐳 Building Trading Bot v4 Docker Image..."
|
|
echo ""
|
|
|
|
# Navigate to v4 directory
|
|
cd "$(dirname "$0")"
|
|
|
|
# Check if .env exists
|
|
if [ ! -f ".env" ]; then
|
|
echo "⚠️ Warning: .env file not found!"
|
|
echo " Creating from .env.example..."
|
|
cp .env.example .env
|
|
echo " ✅ .env created. Please edit it with your credentials."
|
|
echo ""
|
|
fi
|
|
|
|
# Build with BuildKit for better performance
|
|
export DOCKER_BUILDKIT=1
|
|
|
|
echo "📦 Building image with BuildKit..."
|
|
docker-compose build --progress=plain
|
|
|
|
echo ""
|
|
echo "✅ Build complete!"
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo " 1. Edit .env file with your credentials"
|
|
echo " 2. Run: docker-compose up -d"
|
|
echo " 3. Check logs: docker-compose logs -f"
|
|
echo ""
|