Docker Deployment Strategy #6

Merged
mik-tf merged 14 commits from master-deployment into master 2026-01-03 22:10:15 +00:00
Contributor

Docker Deployment Infrastructure

This PR implements Docker deployment infrastructure and binary release preparation for HERO Ledger.

🐋 Docker Infrastructure

Two-Image Architecture

hero_ledger_cli (~100 MB) - Lightweight CLI container

  • heronear CLI for account management
  • Rhai scripting support
  • Connects to public NEAR RPC
  • Perfect for users and CI/CD pipelines

hero_ledger_full (~500 MB) - Complete node with neard

  • Everything in CLI image
  • neard 2.10.3 (built from source)
  • NEAR CLI tools
  • Local blockchain for development

Key Features

Separate images with independent :latest tags
Optimized multi-stage builds
Clear separation of concerns (CLI vs Full Node)
Ready for registry publishing

Registry Paths

  • forge.ourworld.tf/geomind_research/hero_ledger_cli:latest
  • forge.ourworld.tf/geomind_research/hero_ledger_full:latest

📦 Release Artifacts

This PR prepares three types of release artifacts:

1. Standalone Binary (~15-20 MB)

  • Single executable for account management
  • Platforms: Linux (x64, ARM64), macOS (Intel, Apple Silicon)
  • No dependencies required
  • Rhai scripting support built-in

2. Docker CLI Image (~100 MB)

  • Containerized heronear CLI
  • For Docker users and CI/CD
  • Connects to public NEAR RPC

3. Docker Full Image (~500 MB)

  • Complete setup with neard
  • For local development and node operators
  • Includes local blockchain

📝 Files Changed

Docker Files

  • docker/Dockerfile.cli - Lightweight CLI-only image
  • docker/Dockerfile.full - Full image with neard (fixed build process)
  • docker/docker-compose.yml - Support for both deployment types
  • docker/README.md - Comprehensive Docker documentation

Documentation

  • README.md - Updated Quick Start with deployment options
  • docs/RELEASE.md - Three-artifact release strategy
  • All docs updated for hero_ledger rename

Build Configuration

  • setup/Cargo.toml - Feature flags for binary builds
  • setup/src/bin/heronear.rs - CLI entry point
  • setup/src/lib.rs - Module organization

🔧 Technical Improvements

  1. Fixed neard Build: Updated Dockerfile.full to build neard v2.10.3 from source instead of trying to download non-existent binaries
  2. Multi-stage Optimization: Reduced image sizes through efficient layer caching
  3. Independent Versioning: Each image has its own :latest tag
  4. Feature Flags: Clean separation of features (scripts support)

Testing

Binary Build

cargo build --release -p setup --bin heronear --features scripts
# ✓ Builds successfully
# ✓ Binary size: ~15-20 MB
# ✓ All commands functional
# Docker Deployment Infrastructure This PR implements Docker deployment infrastructure and binary release preparation for HERO Ledger. ## 🐋 Docker Infrastructure ### Two-Image Architecture **hero_ledger_cli** (~100 MB) - Lightweight CLI container - heronear CLI for account management - Rhai scripting support - Connects to public NEAR RPC - Perfect for users and CI/CD pipelines **hero_ledger_full** (~500 MB) - Complete node with neard - Everything in CLI image - neard 2.10.3 (built from source) - NEAR CLI tools - Local blockchain for development ### Key Features ✅ Separate images with independent `:latest` tags ✅ Optimized multi-stage builds ✅ Clear separation of concerns (CLI vs Full Node) ✅ Ready for registry publishing ### Registry Paths - `forge.ourworld.tf/geomind_research/hero_ledger_cli:latest` - `forge.ourworld.tf/geomind_research/hero_ledger_full:latest` ## 📦 Release Artifacts This PR prepares three types of release artifacts: ### 1. Standalone Binary (~15-20 MB) - Single executable for account management - Platforms: Linux (x64, ARM64), macOS (Intel, Apple Silicon) - No dependencies required - Rhai scripting support built-in ### 2. Docker CLI Image (~100 MB) - Containerized heronear CLI - For Docker users and CI/CD - Connects to public NEAR RPC ### 3. Docker Full Image (~500 MB) - Complete setup with neard - For local development and node operators - Includes local blockchain ## 📝 Files Changed ### Docker Files - `docker/Dockerfile.cli` - Lightweight CLI-only image - `docker/Dockerfile.full` - Full image with neard (fixed build process) - `docker/docker-compose.yml` - Support for both deployment types - `docker/README.md` - Comprehensive Docker documentation ### Documentation - `README.md` - Updated Quick Start with deployment options - `docs/RELEASE.md` - Three-artifact release strategy - All docs updated for hero_ledger rename ### Build Configuration - `setup/Cargo.toml` - Feature flags for binary builds - `setup/src/bin/heronear.rs` - CLI entry point - `setup/src/lib.rs` - Module organization ## 🔧 Technical Improvements 1. **Fixed neard Build**: Updated Dockerfile.full to build neard v2.10.3 from source instead of trying to download non-existent binaries 2. **Multi-stage Optimization**: Reduced image sizes through efficient layer caching 3. **Independent Versioning**: Each image has its own `:latest` tag 4. **Feature Flags**: Clean separation of features (scripts support) ## ✅ Testing ### Binary Build ```bash cargo build --release -p setup --bin heronear --features scripts # ✓ Builds successfully # ✓ Binary size: ~15-20 MB # ✓ All commands functional ```
Focus this PR on Docker infrastructure and binary releases only.
Embedded contract deployment removed to avoid confusion about
canonical tokens (SPORE, GLD, USDH) being redeployed by anyone.

Changes:
- Removed setup/src/contracts.rs module
- Removed embedded-contracts feature from Cargo.toml
- Removed heronear deploy/contracts/version commands
- Updated Dockerfiles to remove embedded-contracts feature flag
- Updated all documentation to remove embedded contracts references
- Binary now focuses on account management and Rhai scripting

This keeps the PR focused on deployment infrastructure while
embedded contract strategy can be designed separately.
Remove references to embedded contracts deployment.
Focus on testing:
- Binary builds and CLI commands
- Docker CLI and Full images
- Rhai scripts execution
- All feature areas (SPOREX, KVS, DNS, Groups, Credit)
- Local setup end-to-end testing

Added comprehensive test checklist and troubleshooting guide.
mik-tf merged commit 547e119752 into master 2026-01-03 22:10:15 +00:00
mik-tf deleted branch master-deployment 2026-01-03 22:10:15 +00:00
Sign in to join this conversation.
No reviewers
No labels
urgent
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_research/hero_ledger!6
No description provided.