Skip to content

Commit

Permalink
chore(backend): consistent healthcheck (#997)
Browse files Browse the repository at this point in the history
- made healthcheck response of measure-go match with
symbolicator-retrace
- update healthcheck test for api service to send `GET` requests only
  • Loading branch information
detj authored Aug 6, 2024
1 parent 07ea12c commit d55959c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion measure-backend/measure-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ func main() {
MaxAge: 12 * time.Hour,
})

// health check
r.GET("/ping", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"message": "pong"})
c.String(http.StatusOK, "pong")
})

// Auth routes
Expand Down
2 changes: 1 addition & 1 deletion self-host/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ services:
- path: ../measure-backend/measure-go
action: rebuild
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/ping"]
test: ["CMD", "wget", "-q", "http://localhost:8080/ping"]
interval: 5s
timeout: 10s
retries: 5
Expand Down

0 comments on commit d55959c

Please sign in to comment.