Files
mev-beta/docker-compose.yml
Administrator 52e63a0d11 Add production Docker deployment configuration and updated deployment guide
- Add docker-compose.yml with production-ready configuration including auto-restart, health checks, resource limits, and security hardening
- Completely rewrite DEPLOYMENT_GUIDE.md from smart contract deployment to comprehensive Docker/L2 MEV bot deployment guide
- New guide includes Docker deployment, systemd integration, monitoring setup with Prometheus/Grafana, performance optimization, security configuration, and troubleshooting
- Configuration supports environment-based setup with .env file integration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 03:03:34 +01:00

43 lines
1.1 KiB
YAML

version: '3.8'
services:
mev-bot:
build:
context: .
dockerfile: Dockerfile
image: mev-bot:latest
container_name: mev-bot-production
restart: always
volumes:
# Mount only the config file for production
- ./config/config.production.yaml:/app/config/config.yaml:ro
# Optional: mount a directory for logs if needed
# - ./logs:/app/logs
environment:
- LOG_LEVEL=${LOG_LEVEL:-info}
- ARBITRUM_RPC_ENDPOINT=${ARBITRUM_RPC_ENDPOINT:-https://arbitrum-rpc.publicnode.com}
# Add any other environment variables from .env file
env_file:
- .env
ports:
- "${PORT:-8080}:8080"
command: ["start"]
# Health check to ensure the bot is running properly
healthcheck:
test: ["CMD-SHELL", "pgrep -f mev-bot || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Security options
security_opt:
- no-new-privileges:true
# Resource limits (adjust as needed)
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M