Skip to content

Commit

Permalink
Merge pull request #89 from Jisagi/master
Browse files Browse the repository at this point in the history
add healthcheck for docker
  • Loading branch information
Forceu committed Feb 22, 2023
2 parents 82f9f0f + dd75299 commit 9d04352
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ RUN cd /compile && go generate ./... && CGO_ENABLED=0 go build -ldflags="-s -w -
FROM alpine:3.13


RUN apk add ca-certificates && mkdir /app && touch /app/.isdocker
RUN apk add ca-certificates curl && mkdir /app && touch /app/.isdocker
COPY --from=build_base /compile/gokapi /app/gokapi
WORKDIR /app

CMD ["/app/gokapi"]
HEALTHCHECK --interval=10s --timeout=5s --retries=3 CMD curl --fail http://127.0.0.1:53842 || exit 1

0 comments on commit 9d04352

Please sign in to comment.