Files
mev-beta/docker-compose.yml
Administrator 0e39b0795b feat(docker): add podman-compose support and fix deployment issues
Update production Docker deployment to support both Docker and Podman
container runtimes with automatic detection.

Changes:
- Update deploy-production-docker.sh: Auto-detect podman/docker runtime
- Update docker-compose.yml: Use config.dev.yaml, remove problematic config mount
- Fix .env file: Remove quotes from environment values (prevents URL parsing errors)
- Fix logs directory permissions: Ensure writable by container user

Features:
- Automatic container runtime detection (podman preferred over docker)
- Uses container-runtime.sh for runtime detection
- Config file baked into image during build
- Environment variables override config settings
- Fixed WebSocket endpoint validation errors

Testing:
- Successfully deployed with podman-compose
- Container runs with restart: always policy
- Metrics server running on port 9090
- RPC endpoints validated correctly
- Pool discovery system initialized

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 04:29:32 +01:00

44 lines
1.2 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 logs directory for persistent logs
- ./logs:/app/logs
# Mount development config (simpler, no YAML parsing issues)
- ./config/config.dev.yaml:/app/config/config.yaml:ro
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"
- "${METRICS_PORT:-9090}:9090"
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