Introduces a new interactive help command with button navigation, adds a detailed DEPLOYMENT.md guide, and improves server setup validation and error handling. Updates command registration to include all 9 games, adds version reporting, enhances Docker deployment with a multi-platform script, and removes local .env files from the repo. Also refactors bot startup for better diagnostics and graceful shutdown.
4.1 KiB
4.1 KiB
🚀 VRBattles Discord Bot - Deployment Guide
📦 Latest Version: v1.2.7
What's New in v1.2.7:
- ✅ Fixed Docker multi-platform build (x86_64 + ARM64)
- ✅ Resolved "exec format error" on Coolify deployment
- ✅ Enhanced deployment script with buildx support
Previous in v1.2.6:
- ✅ Fixed autocomplete interaction spam
- ✅ All 9 games now available in dropdowns
- ✅ Working help button navigation
- ✅ Automatic game sync from Supabase
- ✅ Optimized Docker image (355MB)
- ✅ Enhanced error handling
Docker Images Available:
far54/vrbattles-discord-bot:latest (always current)
far54/vrbattles-discord-bot:v1.2.7 (specific version)
Multi-Platform Support:
Images are built for both Intel/AMD (x86_64) and ARM64 architectures to ensure compatibility across different server environments. If you encounter "exec format error", the image architecture doesn't match your server.
🔧 Deploy to Coolify
Option 1: Using Docker Hub Image
- Create New Application in Coolify
- Source Type: Public Repository
- Docker Image:
far54/vrbattles-discord-bot:latest - Port:
3000
Option 2: From GitHub (Auto-deploy)
- Source Type: Git Repository
- Repository: Your GitHub repo URL
- Branch:
main - Build Pack: Docker
- Port:
3000
🔐 Required Environment Variables
Set these in Coolify Environment tab:
# Discord Configuration
DISCORD_TOKEN=your_discord_bot_token
DISCORD_APPLICATION_ID=your_discord_application_id
# Supabase Configuration
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key
# Environment
NODE_ENV=production
🎯 Features Included
Commands Available:
/help- Interactive help system with working buttons/finduser- Search players (9 game dropdown)/findteam- Search teams (9 game dropdown)/matchhistory- View match history (optional game filter)/subscribe- Admin: Subscribe to game notifications/unsubscribe- Admin: Remove game subscriptions/list_subscriptions- Admin: View active subscriptions/register_server- Admin: Register server with BattleBot/version- Show bot version and system info
Supported Games:
- Big Ballers VR
- Blacktop Hoops
- Breachers
- Echo Arena
- Echo Combat
- Gun Raiders
- Nock
- Orion Drift
- VAIL
Services:
- Discord Bot: Main command handling
- Webhook Server: Port 3000 for match notifications
- Auto Sync: Game choices sync with Supabase
🔄 Updating Games
When you add/remove games in Supabase:
# Locally run:
npm run sync-games
# Then rebuild and push (multi-platform):
./scripts/deploy.sh v1.2.7
# Update Coolify deployment
🏗️ Building for Production
Using Deploy Script (Recommended):
# This builds for both Intel/AMD and ARM64
./scripts/deploy.sh v1.2.7
Manual Multi-Platform Build:
# Setup buildx (one-time)
docker buildx create --name multiarch --use --driver docker-container --bootstrap
# Build and push for both architectures
docker buildx build --platform linux/amd64,linux/arm64 \
-t far54/vrbattles-discord-bot:v1.2.7 \
. --push
📊 Health Check
The Docker container includes a health check that validates:
- Node.js process is running
- Port 3000 is accessible
- Basic application startup
🔍 Troubleshooting
Common Issues:
- Bot not responding: Check DISCORD_TOKEN is valid
- Database errors: Verify SUPABASE_URL and SUPABASE_KEY
- Game dropdowns empty: Run
npm run sync-gamesand redeploy - Help buttons not working: Ensure latest v1.2.7+ is deployed
- exec format error: Architecture mismatch - use multi-platform images
Log Locations:
- Coolify: Check application logs tab
- Discord: Bot activity in server
- Health:
/versioncommand shows system info
🎉 Deployment Complete!
Your bot should now be running with:
- ✅ All 9 games in dropdowns
- ✅ Working help navigation
- ✅ No debug message spam
- ✅ Match notifications on port 3000
- ✅ Clean, optimized Docker image