MQL5-Google-Onedrive/QUICK_DEPLOY.md

2.6 KiB

Quick Cloud Deployment Guide

Prerequisites

  1. Docker Desktop - Must be running
  2. Fly.io CLI (for Fly.io deployment)
  3. GitHub account (for Render.com)

Quick Deploy Commands

# Deploy to Fly.io
.\scripts\deploy_cloud_simple.ps1 -Platform flyio

# Deploy to Render (instructions)
.\scripts\deploy_cloud_simple.ps1 -Platform render

# Deploy to Railway
.\scripts\deploy_cloud_simple.ps1 -Platform railway

Option 2: Python Script

# Deploy to Fly.io
python scripts/deploy_cloud.py flyio

# Deploy to Render
python scripts/deploy_cloud.py render

# Deploy to Railway
python scripts/deploy_cloud.py railway

Option 3: Manual Deployment

Fly.io

  1. Install Fly CLI (if not installed):

    iwr https://fly.io/install.ps1 -useb | iex
    
  2. Login:

    flyctl auth login
    
  3. Deploy:

    flyctl deploy
    

Render.com

  1. Push to GitHub:

    git add .
    git commit -m "Deploy to Render"
    git push origin main
    
  2. Go to Render.com:

    • Visit https://render.com
    • Create new Web Service
    • Connect GitHub repository
    • Render auto-detects render.yaml
    • Deploy!

Railway.app

  1. Install Railway CLI:

    npm i -g @railway/cli
    
  2. Login and Deploy:

    railway login
    railway init
    railway up
    

Environment Variables

Set these secrets in your cloud platform:

Required

  • PYTHONUNBUFFERED=1
  • TZ=UTC
  • ENV=production

Optional (for Telegram Bot)

  • TELEGRAM_BOT_TOKEN (from config/vault.json)
  • TELEGRAM_ALLOWED_USER_IDS (comma-separated user IDs)

Setting Secrets

Fly.io:

flyctl secrets set TELEGRAM_BOT_TOKEN=your_token_here

Render.com:

  • Dashboard → Environment → Add Secret

Railway:

  • Dashboard → Variables → Add Variable

Troubleshooting

Docker Not Running

# Start Docker Desktop manually, or:
Start-Process "C:\Program Files\Docker\Docker\Docker Desktop.exe"

Build Fails

# Test Docker build locally
docker build -f Dockerfile.cloud -t mql5-automation:latest .

Deployment Fails

  1. Check logs: flyctl logs (or platform equivalent)
  2. Verify environment variables are set
  3. Check Dockerfile.cloud syntax
  4. Ensure requirements.txt is up to date

Next Steps

After deployment:

  • Check app status: flyctl status
  • View logs: flyctl logs
  • Test Telegram bot: Send /start to your bot
  • Monitor: Use platform dashboard