่ทณ่ฝฌ่‡ณ

๐Ÿณ Docker Installation Guide

Difficulty: โญ Easy
Time: 5 minutes


โœ… Prerequisites

  • Docker installed (Get Docker)
  • API Keys (Twelve Data, Alpha Vantage)

๐Ÿš€ Quick Start

1. Create Configuration Directory

mkdir -p ta-config && cd ta-config

2. Download Configuration Files

# Download .env template
curl -O https://raw.githubusercontent.com/XuXuClassMate/trading-assistant/main/.env.example
cp .env.example .env

# Download watchlist template
curl -O https://raw.githubusercontent.com/XuXuClassMate/trading-assistant/main/watchlist.txt.example
cp watchlist.txt.example watchlist.txt

3. Edit Configuration

# Edit .env with your API keys
nano .env  # or use your favorite editor

Required API Keys:

TWELVE_DATA_API_KEY=your_key_here
ALPHA_VANTAGE_API_KEY=your_key_here

4. Run Docker Container

Interactive Mode:

docker run --rm -it \
  -v $(pwd)/.env:/app/.env \
  -v $(pwd)/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest

Direct Command:

docker run --rm -it \
  -v $(pwd)/.env:/app/.env \
  -v $(pwd)/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest \
  ta sig


๐Ÿ“‹ Available Images

Registry Image Command
GitHub Packages ghcr.io/xuxuclassmate/trading-assistant:latest Recommended
Docker Hub xuxuclassmate/trading-assistant:latest Alternative

๐ŸŽฏ Usage Examples

Interactive CLI

$ docker run --rm -it \
  -v $(pwd)/.env:/app/.env \
  -v $(pwd)/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest

ta> help
ta> sig
ta> pos --symbol NVDA --price 175 --capital 10000
ta> exit

One-Command Analysis

# All analysis at once
docker run --rm -it \
  -v $(pwd)/.env:/app/.env \
  -v $(pwd)/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest \
  ta all

Specific Symbol

# Signals for NVDA
docker run --rm -it \
  -v $(pwd)/.env:/app/.env \
  -v $(pwd)/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest \
  ta sig --symbol NVDA

๐Ÿ”ง Advanced Options

Run in Background (Detached Mode)

docker run -d --name trading-assistant \
  -v $(pwd)/.env:/app/.env \
  -v $(pwd)/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest

View Logs

docker logs -f trading-assistant

Stop Container

docker stop trading-assistant
docker rm trading-assistant

Update to Latest Version

docker pull ghcr.io/xuxuclassmate/trading-assistant:latest
docker stop trading-assistant
docker rm trading-assistant
# Re-run with same command as above

โ“ Troubleshooting

Permission Denied Error

# Run with current user
docker run --rm -it \
  -u $(id -u):$(id -g) \
  -v $(pwd)/.env:/app/.env \
  -v $(pwd)/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest

API Key Errors

Make sure your .env file has valid API keys:

TWELVE_DATA_API_KEY=your_actual_key
ALPHA_VANTAGE_API_KEY=your_actual_key

Volume Mount Issues

Use absolute paths:

docker run --rm -it \
  -v /absolute/path/to/.env:/app/.env \
  -v /absolute/path/to/watchlist.txt:/app/watchlist.txt \
  ghcr.io/xuxuclassmate/trading-assistant:latest


๐Ÿ“š Next Steps