Complete containerized environment for HelixCode with network access, distributed processing, and easy management.
# 1. Make the facade script executable
chmod +x helix
# 2. Setup environment
cp .env.example .env
# Edit .env with your preferences
# 3. Start everything (or let commands auto-start)
./helix start
# 4. Access services
./helix status # View connection info
./helix tui # Open Terminal UI (auto-starts if needed)
./helix cli --help # Use CLI (auto-starts if needed)- Docker and Docker Compose
- 4GB+ RAM recommended
- Git (for repository access)
- helixcode: Main application with REST API, CLI, and Terminal UI
- postgres: PostgreSQL database for persistent storage
- redis: Redis cache for sessions and queues
- worker-1/worker-2: Distributed worker nodes
- Internal Network:
helixcode-network(172.20.0.0/16) - Port Mapping: Configurable via environment variables
- Service Discovery: Automatic in distributed mode
# Security (REQUIRED - change these!)
HELIX_DATABASE_PASSWORD=your-secure-password
HELIX_AUTH_JWT_SECRET=your-jwt-secret
HELIX_REDIS_PASSWORD=your-redis-password
# Port Configuration
HELIX_API_PORT=8080 # REST API port
HELIX_SSH_PORT=2222 # Worker SSH port
HELIX_WEB_PORT=3000 # Web interface port
# Network Mode
HELIX_NETWORK_MODE=standalone # standalone or distributed
HELIX_AUTO_PORT=true # Auto-adjust if ports occupied (recommended)helix_code/
├── helix # Main facade script
├── Dockerfile # Main application image
├── docker-compose.helix.yml # Complete stack definition
├── docker-entrypoint.sh # Container entrypoint
├── .env.example # Environment template
├── DOCKER_SETUP.md # Detailed documentation
├── test-docker-setup.sh # Comprehensive test suite
└── README_DOCKER.md # This file
# Start services (or let commands auto-start)
./helix start
# Check status and connection info
./helix status
# Run CLI commands (AUTO-STARTS if needed)
./helix cli --list-workers
./helix cli --health
./helix cli --prompt "Hello world" --model llama-3-8b
# Open Terminal UI (AUTO-STARTS if needed)
./helix tui
# View logs
./helix logs
./helix logs helixcode
# Stop services
./helix stop
# Restart
./helix restartCommands like cli, tui, and server automatically start the container if it's not running:
# No need to run 'start' first - it happens automatically!
./helix cli --help # Auto-starts container
./helix tui # Auto-starts container
./helix cli --list-models # Auto-starts containerYou can also access the container directly:
# Execute commands in container
docker exec -it helixcode helix cli --help
# Access shell
docker exec -it helixcode /bin/bash
# View running processes
docker exec helixcode ps aux
# Note: Use ./helix commands for auto-start convenience📊 Available Services:
• REST API: http://localhost:8080
• SSH Workers: localhost:2222
• Web Interface: http://localhost:3000
📁 Accessible Directories:
• Workspace: ./workspace
• Projects: ./projects
• Shared: ./shared
- Single container with all services
- Simple setup, ideal for development
- Multiple containers can connect
- Automatic service discovery
- Enable with:
HELIX_NETWORK_MODE=distributed
./test-docker-setup.sh# Test auto-start feature
./helix cli --health # Should auto-start container
./helix tui # Should auto-start container
# Test service connectivity
curl http://localhost:8080/health
# Test CLI functionality
./helix cli --list-workers
./helix cli --list-models
# Test worker connectivity
docker exec helixcode-worker-1 echo "test"
# Cleanup
./helix stopPort Conflicts:
# Check what's using ports
netstat -tulpn | grep :8080
# Or use auto-port adjustment (enabled by default)
HELIX_AUTO_PORT=true ./helix startContainer Not Starting:
# Check logs
./helix logs
# Check Docker daemon
docker info
# Check resources
docker system dfWorker Connection Issues:
# Check SSH setup
ls -la helix_code/test/ssh-keys/
# Test worker connectivity
docker exec helixcode ssh worker-1 echo "test"- Minimum: 2GB RAM, 2 CPU cores
- Recommended: 4GB RAM, 4 CPU cores
- Production: 8GB+ RAM, 8+ CPU cores
- Change default passwords in
.env - Use HTTPS in production
- Restrict network access to necessary ports
- Regular updates of container images
- Resource limits for containers
.envfile is gitignored- Sensitive tokens stored securely
- Database passwords encrypted
- JWT secrets randomized
# Increase resources in docker-compose.helix.yml
deploy:
resources:
limits:
cpus: '4.0'
memory: 8G# Use external databases
HELIX_DATABASE_URL=postgres://user:pass@host:port/db
HELIX_REDIS_URL=redis://user:pass@host:port/db# Container stats
docker stats
# Log monitoring
./helix logs -f
# Health checks
curl http://localhost:8080/health- DOCKER_SETUP.md - Detailed setup guide
- HelixCode README - Main project documentation
- API Documentation - REST API reference
For issues:
- Check
./helix logs - Verify
./helix status - Run
./test-docker-setup.sh - Review troubleshooting section
Part of the HelixCode project. See main project LICENSE for details.