- Copy
.env.exampleto.envand fill in all values - Ensure PostgreSQL database is running and accessible
- Test database connection with
DATABASE_URL - Verify Discord bot token is valid
- Confirm OpenAI API key has credits
- Confirm Tavily API key is valid
-
TOKEN- Your Discord bot token -
CLIENT_ID- Your Discord application client ID
-
DATABASE_URL- PostgreSQL connection string
-
OPENAI_API_KEY- OpenAI API key -
TAVILY_API_KEY- Tavily search API key
# 1. Build and start the bot
docker compose up -d --build
# 2. Check logs
docker compose logs -f echo-bot
# 3. Stop the bot
docker compose down# 1. Build the image
docker build -t echo-bot .
# 2. Run the container
docker run -d \
--name echo-bot \
--env-file .env \
--restart unless-stopped \
echo-bot
# 3. Check logs
docker logs -f echo-bot
# 4. Stop the container
docker stop echo-bot
docker rm echo-bot-
Create New Application
- Select "Docker Compose" or "Dockerfile"
- Connect your Git repository
-
Set Environment Variables (in Dokploy UI)
TOKEN=your_token CLIENT_ID=your_client_id DATABASE_URL=postgresql://... OPENAI_API_KEY=your_key TAVILY_API_KEY=your_key -
Deploy
- Click "Deploy" button
- Monitor logs for startup
-
Verify
- Bot should appear online in Discord
- Check health status in Dokploy
-
Check logs for error messages
docker logs echo-bot # or in Dokploy: View Logs -
Verify environment variables
- All required vars are set
- No typos in variable names
- TOKEN is valid and not expired
-
Database connection
- DATABASE_URL format is correct
- Database is accessible from container
- Database exists and schema is up to date
-
API Keys
- OPENAI_API_KEY is valid and has credits
- TAVILY_API_KEY is valid
"Missing required environment variables"
- Solution: Set all required env vars in your deployment
"Failed to start bot"
- Check Discord token validity
- Verify bot has proper intents enabled in Discord Developer Portal
"Database connection failed"
- Verify DATABASE_URL is correct
- Check database is running and accessible
- Ensure database user has proper permissions
Import errors / Module not found
- This was fixed - ensure you're using the latest code
- Verify all imports use
#prefix (not@)
The bot includes:
- Environment variable validation at startup
- Automatic database migration on container start
- Health check every 30 seconds
- Auto-restart on failure
- Verify bot appears online in Discord
- Test basic commands
- Check database connectivity
- Monitor logs for errors
- Set up log monitoring/alerts (optional)
# Pull latest changes
git pull
# Rebuild and restart
docker compose down
docker compose up -d --build
# Or in Dokploy: click "Rebuild" button✅ All checks passed? Your bot should be online!