Files
trading_bot_v3/DEPLOYMENT.md
mindesbunister c9295c40a4 docs: Add comprehensive deployment guide
- Complete step-by-step deployment instructions
- Prerequisites and environment setup
- Docker Compose V2 commands
- Production configuration tips
- Troubleshooting section
- Ready for easy deployment on any machine
2025-07-13 23:12:02 +02:00

2.6 KiB

🚀 Easy Deployment Guide

This trading bot dashboard is fully containerized and ready for deployment on any machine!

Prerequisites

The target machine only needs:

  1. Docker & Docker Compose V2 installed
  2. Git for cloning the repository
  3. Environment variables configured

📦 Quick Deployment Steps

1. Clone the Repository

git clone https://gitea.egonetix.de/root/trading_bot_v3.git
cd trading_bot_v3

2. Setup Environment Variables

Create a .env file with your credentials:

cp .env.example .env  # If example exists
# OR create .env manually with:

Required environment variables:

# TradingView Credentials
TRADINGVIEW_EMAIL=your_email@example.com
TRADINGVIEW_PASSWORD=your_password

# OpenAI API (for AI analysis)
OPENAI_API_KEY=your_openai_api_key

# Drift Protocol (optional)
DRIFT_PRIVATE_KEY=your_drift_private_key
DRIFT_RPC_URL=your_solana_rpc_url

# Application Settings
NEXT_PUBLIC_APP_URL=http://localhost:9000

3. Deploy with Docker Compose V2

# Build and start the application
docker compose up --build -d

# Check status
docker compose ps

# View logs
docker compose logs -f app

# Stop the application
docker compose down

🌐 Access the Application

Once deployed, the application will be available at:

🔧 Production Configuration

For production deployment, you may want to:

  1. Use production compose file:

    docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
    
  2. Setup reverse proxy (nginx/traefik) for HTTPS

  3. Configure firewall to allow port 9000

  4. Setup monitoring and health checks

📊 Features Available

  • AI-Powered Trading Analysis
  • Automated Screenshot Capture
  • Multi-Layout Chart Support
  • Drift Protocol Integration
  • Real-time Trade Execution
  • Session Persistence
  • Docker Health Checks

🛠️ Troubleshooting

Container won't start:

docker compose logs app

Port conflicts:

# Change port mapping in docker-compose.yml
ports:
  - "8000:3000"  # Use port 8000 instead

Environment issues:

# Check environment variables are loaded
docker compose exec app env | grep TRADING

🔄 Updates

To update to the latest version:

git pull origin main
docker compose down
docker compose up --build -d

Note: This deployment is fully self-contained. All dependencies, build tools, and runtime requirements are included in the Docker container.