feat(prod): complete production deployment with Podman containerization
- Migrate from Docker to Podman for enhanced security (rootless containers) - Add production-ready Dockerfile with multi-stage builds - Configure production environment with Arbitrum mainnet RPC endpoints - Add comprehensive test coverage for core modules (exchanges, execution, profitability) - Implement production audit and deployment documentation - Update deployment scripts for production environment - Add container runtime and health monitoring scripts - Document RPC limitations and remediation strategies - Implement token metadata caching and pool validation This commit prepares the MEV bot for production deployment on Arbitrum with full containerization, security hardening, and operational tooling. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Run CI pipeline inside a container (for isolation)
|
||||
# Usage: ./scripts/ci-container.sh [quick|dev|full]
|
||||
# Supports: Podman, Docker, and Podman-in-Podman
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -16,40 +17,48 @@ case $MODE in
|
||||
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true"
|
||||
;;
|
||||
full)
|
||||
echo "🐳 Running Full CI in Container (no Docker build)..."
|
||||
echo "🐳 Running Full CI in Container (Podman/Docker compatible)..."
|
||||
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [quick|dev|full]"
|
||||
echo " quick - Fast validation (30-60s)"
|
||||
echo " dev - Development pipeline (1-2min)"
|
||||
echo " full - Complete validation except Docker (2-3min)"
|
||||
echo " full - Complete validation with container support (2-3min)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check for container runtime
|
||||
if command -v podman >/dev/null 2>&1; then
|
||||
RUNTIME="podman"
|
||||
elif command -v docker >/dev/null 2>&1; then
|
||||
RUNTIME="docker"
|
||||
else
|
||||
echo "❌ Error: Neither podman nor docker found"
|
||||
# Load container runtime detection
|
||||
source "$(dirname "$0")/container-runtime.sh" init
|
||||
|
||||
if [[ -z "$CONTAINER_RUNTIME" ]]; then
|
||||
echo "❌ Error: No container runtime found (podman or docker required)"
|
||||
echo "Install with: sudo apt install podman"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using container runtime: $RUNTIME"
|
||||
echo "Using container runtime: $CONTAINER_RUNTIME"
|
||||
echo ""
|
||||
|
||||
# Create cache directories for performance
|
||||
mkdir -p .gocache .gomodcache
|
||||
|
||||
# Get DinD mount flags if inside container
|
||||
DIND_MOUNTS=""
|
||||
if [[ "$INSIDE_CONTAINER" == "true" ]]; then
|
||||
DIND_MOUNTS="$(source "$(dirname "$0")/container-runtime.sh" socket)"
|
||||
if [[ -n "$DIND_MOUNTS" ]]; then
|
||||
DIND_MOUNTS="-v $DIND_MOUNTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run pipeline in container
|
||||
$RUNTIME run --rm \
|
||||
$CONTAINER_RUNTIME run --rm \
|
||||
-v "$(pwd)":/workspace \
|
||||
-v "$(pwd)/.gocache":/root/.cache/go-build \
|
||||
-v "$(pwd)/.gomodcache":/go/pkg/mod \
|
||||
$DIND_MOUNTS \
|
||||
-w /workspace \
|
||||
$SKIP_FLAGS \
|
||||
golang:1.25-alpine \
|
||||
|
||||
Reference in New Issue
Block a user