feat: add health hander and healtchek to docker image and update cd pipline for backend
All checks were successful
Backend ci / build (push) Successful in 3m11s
All checks were successful
Backend ci / build (push) Successful in 3m11s
This commit is contained in:
@@ -15,5 +15,5 @@ FROM alpine:3.23.0
|
||||
COPY --from=builder /app/backend .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK CMD curl --fail http://localhost:8080/health || exit 1
|
||||
CMD ["./backend"]
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
func Register(router *gin.Engine, db *sql.DB) {
|
||||
handler_posts := NewPostHandlers(repositories.NewPostRepository(db))
|
||||
handler_auth := NewAuthHandlers(repositories.NewAuthRepository(db))
|
||||
router.GET("/health", func(c *gin.Context) { c.Status(200) })
|
||||
v1 := router.Group("api/v1")
|
||||
v1.GET("/callback/github", handler_auth.CallbackGithub)
|
||||
v1.GET("/auth/github", handler_auth.LoginGithub)
|
||||
|
||||
Reference in New Issue
Block a user