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:
mindesbunister
2025-10-27 12:59:25 +01:00
parent f8f289232a
commit 14d5de2c64
48 changed files with 37 additions and 14 deletions

36
scripts/docker/docker-build.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/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 ""

14
scripts/docker/docker-logs.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Trading Bot v4 - Docker Logs Script
# Shows real-time logs from all containers
set -e
cd "$(dirname "$0")"
echo "📋 Trading Bot v4 Logs"
echo "Press Ctrl+C to exit"
echo ""
docker-compose logs -f --tail=100 trading-bot

43
scripts/docker/docker-start.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/bash
# Trading Bot v4 - Docker Start Script
# Starts the trading bot in production mode
set -e
echo "🚀 Starting Trading Bot v4..."
echo ""
# Navigate to v4 directory
cd "$(dirname "$0")"
# Check if .env exists
if [ ! -f ".env" ]; then
echo "❌ Error: .env file not found!"
echo " Run: cp .env.example .env"
echo " Then edit .env with your credentials"
exit 1
fi
# Check if image exists
if ! docker images | grep -q "trading-bot"; then
echo "📦 Image not found. Building..."
./docker-build.sh
fi
# Start services
echo "🐳 Starting containers..."
docker-compose up -d
echo ""
echo "✅ Trading Bot started!"
echo ""
echo "Status:"
docker-compose ps
echo ""
echo "View logs:"
echo " docker-compose logs -f trading-bot"
echo ""
echo "Stop bot:"
echo " docker-compose down"
echo ""

24
scripts/docker/docker-stop.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# Trading Bot v4 - Docker Stop Script
# Safely stops all containers
set -e
echo "🛑 Stopping Trading Bot v4..."
echo ""
cd "$(dirname "$0")"
# Stop containers
docker-compose stop
echo ""
echo "✅ Containers stopped"
echo ""
echo "To remove containers:"
echo " docker-compose down"
echo ""
echo "To remove containers and volumes:"
echo " docker-compose down -v"
echo ""