feat: add Docker container management functionality

- Implement DockerHandler to handle API requests for listing Docker containers.
- Create DockerService to interact with Docker API and retrieve container information.
- Add routes for Docker container management in the API.
- Introduce frontend API integration for Docker container listing.
- Enhance ProxyHostForm to allow quick selection of Docker containers.
- Update Docker-related tests to ensure functionality and error handling.
- Modify Docker Compose files to enable Docker socket access for local and remote environments.
- Add TypeScript configurations for improved build processes.
This commit is contained in:
Wikid82
2025-11-20 21:27:02 -05:00
parent 8c67e656b9
commit 9f62a4a2df
27 changed files with 691 additions and 71 deletions

View File

@@ -93,6 +93,15 @@ func Register(router *gin.Engine, db *gorm.DB, cfg config.Config) error {
protected.POST("/notifications/:id/read", notificationHandler.MarkAsRead)
protected.POST("/notifications/read-all", notificationHandler.MarkAllAsRead)
// Docker
dockerService, err := services.NewDockerService()
if err == nil { // Only register if Docker is available
dockerHandler := handlers.NewDockerHandler(dockerService)
dockerHandler.RegisterRoutes(protected)
} else {
fmt.Printf("Warning: Docker service unavailable: %v\n", err)
}
// Uptime Service
uptimeService := services.NewUptimeService(db, notificationService)