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>
This commit is contained in:
43
docker-compose.yml
Normal file
43
docker-compose.yml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
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
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user