A simple, self-hosted Docker container management platform built with Ivy Framework that allows users to deploy and manage Docker containers through a web interface with GitHub integration.
OpenHosting is a container hosting service that provides:
- Web-based Docker container management
- GitHub repository integration with auto-deployment
- Real-time container status monitoring
- Port management and allocation
- Simple deployment workflow
-
Ivy Web Application
- Main application built with Ivy Framework
- Web interface for container management
- REST API for container operations
-
Docker Service
- Docker API integration for container lifecycle management
- Image building from Dockerfiles
- Container monitoring and health checks
-
GitHub Integration
- Webhook listener for repository push events
- Automatic image rebuilding on main branch updates
- Repository cloning and Dockerfile detection
-
Container Registry
- Local image storage and management
- Version tracking for deployed containers
- Backend: Ivy Framework (.NET 9)
- Container Runtime: Docker
- Database: SQLite (for metadata storage)
- Frontend: Ivy widgets and components
- Git Integration: LibGit2Sharp
- Webhooks: ASP.NET Core webhook handling
- Basic Ivy application setup
- Docker container management
- Web interface for container operations
- Container status monitoring
- Port allocation and management
- GitHub repository integration (basic)
- Webhook setup for auto-deployment
- Dockerfile detection and building (placeholder)
- Automatic container recreation on push
- Container logs viewing
- Resource usage monitoring
- Multiple environment support
- User authentication and authorization
- Container networking management
- .NET 9 SDK
- Docker Desktop or Docker Engine
- Git (for repository cloning)
- Clone the repository
- Run
dotnet restore - Start Docker service
- Run the application:
- Windows: Double-click
start.bator rundotnet run - Linux/Mac: Run
./start.shordotnet run
- Windows: Double-click
- The application will be available at
http://localhost:8080 - Configure GitHub webhook secret in
appsettings.json - Set up port ranges for container allocation in configuration
- Ensure Docker daemon is accessible
For production deployment using Docker:
# Build and run with Docker Compose
docker-compose up -d
# Or build and run manually
docker build -t openhosting .
docker run -p 8080:80 -v /var/run/docker.sock:/var/run/docker.sock openhosting- Go to your GitHub repository settings
- Navigate to "Webhooks" section
- Add a new webhook with URL:
http://your-domain.com/api/webhook/github - Set the secret to match your
appsettings.jsonconfiguration - Select "Just the push event" for the trigger
OpenHosting/
βββ Apps/ # Ivy application files
β βββ HelloApp.cs # Main application entry point
β βββ ContainerApp.cs # Container management app
βββ Services/ # Business logic services
β βββ DockerService.cs # Docker API integration
β βββ GitHubService.cs # GitHub webhook handling
β βββ ContainerService.cs # Container lifecycle management
βββ Models/ # Data models
β βββ Container.cs # Container entity
β βββ Deployment.cs # Deployment configuration
β βββ GitHubWebhook.cs # Webhook payload models
βββ Controllers/ # API controllers
β βββ ContainerController.cs
βββ Views/ # Ivy view components
β βββ ContainerList.cs # Container listing view
β βββ DeploymentForm.cs # Deployment creation form
β βββ StatusDashboard.cs # Status monitoring dashboard
βββ Program.cs # Application entry point
GET /api/containers- List all containersPOST /api/containers- Create new containerGET /api/containers/{id}- Get container detailsPUT /api/containers/{id}- Update containerDELETE /api/containers/{id}- Stop and remove containerPOST /api/containers/{id}/start- Start containerPOST /api/containers/{id}/stop- Stop containerGET /api/containers/{id}/logs- Get container logs
POST /api/webhooks/github- GitHub webhook endpointPOST /api/deployments- Create deployment from GitHub repoGET /api/deployments- List all deployments
GET /api/system/status- System health statusGET /api/system/ports- Available port informationGET /api/system/resources- Resource usage statistics
- GitHub webhook signature verification
- Docker daemon access control
- Port allocation security
- Container isolation
- Input validation and sanitization
-
Manual Deployment
- User provides GitHub repository URL
- System clones repository and detects Dockerfile
- Builds Docker image
- Deploys container with allocated port
- Updates status dashboard
-
Automatic Deployment
- GitHub webhook triggers on main branch push
- System identifies affected deployments
- Rebuilds and redeploys containers
- Notifies user of deployment status
- Container health status tracking
- Resource usage monitoring (CPU, Memory, Network)
- Port usage tracking
- Deployment history and logs
- Error tracking and alerting
- Multi-node cluster support
- Load balancing and scaling
- Custom domain mapping
- SSL certificate management
- Container backup and restore
- Integration with external monitoring tools
- Use Docker-in-Docker for testing
- Implement proper error handling and logging
- Add comprehensive unit and integration tests
- Follow Ivy Framework best practices
- Ensure responsive web interface design
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.