Files
mev-beta/scripts/run-flash-swap-bot.sh
Krypto Kajun 566f3f03ca feat(scripts): add Docker build and execution support to launcher
Added comprehensive Docker support to the launcher script with:

- New --docker flag to run bot in containerized environment
- Docker and docker-compose availability checks
- Automatic .env.docker generation with ARBITRUM_RPC_ENDPOINT
- docker-compose build --no-cache for image building
- docker-compose up/down for container lifecycle management
- Proper error handling when Docker/docker-compose not found
- Graceful container shutdown on Ctrl+C

Docker execution path provides:
- 3-step pre-flight verification (Docker detection, env setup, build)
- Full environment variable configuration
- Container health check integration
- Resource limits (2 CPU, 2GB RAM limits)
- Auto-restart policy for production reliability

Native execution path continues unchanged:
- Binary compilation if needed
- Full pre-flight checks (5 steps)
- Environment variable setup
- Graceful startup and shutdown

Testing Results:
 Docker path properly detected
 Native path executes successfully
 All pre-flight checks pass
 Bot initializes all 20+ services correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 18:58:11 -06:00

13 KiB
Executable File