immortal-bnb/.dockerignore
Claude b4671d5735
feat: Add comprehensive CI/CD, Docker, and DevOps infrastructure
GitHub Actions CI/CD Pipeline (.github/workflows/ci.yml):
- Automated testing for backend, frontend, and smart contracts
- Security scanning with Trivy
- Docker image building on main branch
- Deployment validation checks
- Multi-job workflow with dependency management

Docker Infrastructure:
- Production-optimized Dockerfile with multi-stage build
  - Base image: oven/bun:1 for fast runtime
  - Non-root user for security (botuser)
  - Health check integration
  - Optimized layer caching

- docker-compose.yml for easy deployment
  - Single-command deployment
  - Volume management for logs and data
  - Network isolation
  - Health checks and restart policies
  - Ready for PostgreSQL and Redis integration

- .dockerignore for optimized builds
  - Excludes node_modules, tests, docs
  - Reduces image size significantly

DevOps Scripts:
- scripts/healthcheck.ts - Container health verification
  - HTTP health endpoint check
  - Exit codes for Docker health status
  - Used by Docker HEALTHCHECK directive

- scripts/monitor.ts - Bot monitoring and statistics
  - Real-time bot status display
  - Trading performance metrics (win rate, P/L)
  - System information
  - Watch mode for continuous monitoring
  - Performance indicators and alerts

- scripts/backup.sh - Automated backup system
  - Backs up logs, data, configs
  - Excludes secrets for security
  - Compression and retention (keeps last 7)
  - Backup metadata and restore instructions

- scripts/setup.sh - Developer onboarding
  - Interactive setup wizard
  - Dependency installation (Bun, Node.js)
  - Environment file creation
  - Directory structure setup
  - Optional Hardhat installation
  - Next steps guidance

Environment Templates:
- .env.development - Safe defaults for local dev
  - Testnet configuration
  - Conservative trading limits
  - Debug logging enabled

- .env.production (template only, not committed)
  - Mainnet configuration
  - Production security settings
  - Monitoring integrations
  - Strong API key requirements

Package.json Scripts:
- monitor: Check bot status and performance
- monitor⌚ Continuous monitoring
- backup: Create system backups
- setup: Run setup wizard
- docker:build: Build Docker image
- docker:run: Start with Docker Compose
- docker:stop: Stop containers
- docker:logs: View container logs
- validate: Pre-deployment validation

Documentation:
- DOCKER.md - Complete Docker deployment guide
  - Quick start instructions
  - Configuration management
  - Multi-architecture builds
  - Docker Compose usage
  - Monitoring and logging
  - Backup and restore procedures
  - Production best practices
  - Troubleshooting guide
  - CI/CD integration examples

This infrastructure enables:
✅ One-command deployment (docker-compose up)
✅ Automated testing and security scanning
✅ Production-grade monitoring and health checks
✅ Easy developer onboarding (setup.sh)
✅ Comprehensive backup and disaster recovery
✅ CI/CD pipeline for automated deployments
✅ Multi-environment support (dev/prod)
2025-11-08 20:09:35 +00:00

63 lines
551 B
Plaintext

# Dependencies
node_modules
npm-debug.log
yarn-error.log
bun.lockb
# Environment files
.env
.env.local
.env.*.local
# Development files
.git
.github
.vscode
.idea
# Logs
logs
*.log
# Build artifacts
dist
build
.next
out
# Test files
test
tests
__tests__
*.test.ts
*.test.js
coverage
# Documentation
*.md
!README.md
docs
# Frontend (build separately)
apps/frontend/node_modules
apps/frontend/.next
apps/frontend/out
# Cache
.cache
.turbo
.eslintcache
# OS files
.DS_Store
Thumbs.db
# Hardhat
cache
artifacts
# Temporary files
tmp
temp
*.tmp