diff --git a/Dockerfile b/Dockerfile index 94289c8..0a7c052 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,5 +25,6 @@ USER junv COPY --from=build /app/fonts ./fonts COPY --from=build /app/badger badger +COPY --from=build /app/static ./static CMD ["/home/junv/badger"] diff --git a/Readme.md b/Readme.md index a78500a..5032470 100644 --- a/Readme.md +++ b/Readme.md @@ -11,6 +11,7 @@ Create badges from your prometheus metrics ![Air Index](https://badge.home.toozhao.com/svg/mel) ![Dockerhub Pull](https://badge.home.toozhao.com/svg/dockerhub) ![Github Star](https://badge.home.toozhao.com/svg/github) +[![Github Star](https://badge.home.toozhao.com/svg/aria-ui-dockerhub)](https://badge.home.toozhao.com/svg/aria-ui-dockerhub) [![](https://images.microbadger.com/badges/image/wahyd4/aria2-ui.svg)](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com") diff --git a/main.go b/main.go index 0ff2609..13240f5 100644 --- a/main.go +++ b/main.go @@ -87,6 +87,10 @@ func main() { r := gin.Default() + r.GET("/", func(c *gin.Context) { + c.JSON(200, gin.H{"msg": "Wanna create some badges for your website or Github repo from various data sources? It's coming soon."}) + }) + r.GET("/ping", func(c *gin.Context) { c.JSON(200, gin.H{"msg": "Hello!"}) }) @@ -103,6 +107,9 @@ func main() { } }) + r.StaticFile("/favicon.ico", "static/favicon.ico") + r.StaticFile("/robots.txt", "static/robots.txt") + go func() { http.Handle("/metrics", promhttp.Handler()) if err := http.ListenAndServe(":9090", nil); err != nil { diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..52506e0 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..49f3e46 --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Disallow: * +Allow: / \ No newline at end of file