feat(web): add dockerized web UI with comic library browser
Adds a `yoink serve` command that starts an HTTP server with a Sonarr/MeTube-inspired dark UI. Features a URL input bar for triggering downloads, a 150x300 cover grid with filter and sort controls, a live download queue strip, and toast notifications. Includes Dockerfile (multi-stage, distroless runtime) and docker-compose.yml for easy deployment.
This commit is contained in:
28
cli/healthcheck.go
Normal file
28
cli/healthcheck.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var healthcheckCmd = &cobra.Command{
|
||||
Use: "healthcheck",
|
||||
Short: "Check if the web server is running (used by Docker HEALTHCHECK)",
|
||||
Args: cobra.NoArgs,
|
||||
Hidden: true,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
port, _ := cmd.Flags().GetString("port")
|
||||
resp, err := http.Get(fmt.Sprintf("http://localhost:%s/health", port))
|
||||
if err != nil || resp.StatusCode != http.StatusOK {
|
||||
os.Exit(1)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
healthcheckCmd.Flags().StringP("port", "p", "8080", "Port the server is listening on")
|
||||
cli.AddCommand(healthcheckCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user