Add favicon and robots.txt

This commit is contained in:
2020-08-10 17:01:12 +10:00
parent d429239e05
commit b548379d04
5 changed files with 12 additions and 0 deletions
+1
View File
@@ -25,5 +25,6 @@ USER junv
COPY --from=build /app/fonts ./fonts COPY --from=build /app/fonts ./fonts
COPY --from=build /app/badger badger COPY --from=build /app/badger badger
COPY --from=build /app/static ./static
CMD ["/home/junv/badger"] CMD ["/home/junv/badger"]
+1
View File
@@ -11,6 +11,7 @@ Create badges from your prometheus metrics
![Air Index](https://badge.home.toozhao.com/svg/mel) ![Air Index](https://badge.home.toozhao.com/svg/mel)
![Dockerhub Pull](https://badge.home.toozhao.com/svg/dockerhub) ![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/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") [![](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")
+7
View File
@@ -87,6 +87,10 @@ func main() {
r := gin.Default() 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) { r.GET("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{"msg": "Hello!"}) 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() { go func() {
http.Handle("/metrics", promhttp.Handler()) http.Handle("/metrics", promhttp.Handler())
if err := http.ListenAndServe(":9090", nil); err != nil { if err := http.ListenAndServe(":9090", nil); err != nil {
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+3
View File
@@ -0,0 +1,3 @@
User-agent: *
Disallow: *
Allow: /