mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-04-20 13:59:16 +00:00
ci: add healthcheck directive to dockerfile
Signed-off-by: rare-magma <rare-magma@posteo.eu>
This commit is contained in:
parent
46f4862c3f
commit
afe7cb4163
1 changed files with 4 additions and 1 deletions
|
@ -11,15 +11,18 @@ COPY . .
|
|||
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
RUN go build -o anonymousoverflow
|
||||
RUN go build -o anonymousoverflow && go build -o healthcheck ./src/healthcheck
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /app/anonymousoverflow /anonymousoverflow
|
||||
COPY --from=build /app/healthcheck /healthcheck
|
||||
COPY templates /templates
|
||||
COPY public /public
|
||||
COPY --from=build /etc/ssl/certs /etc/ssl/certs
|
||||
|
||||
HEALTHCHECK --interval=60s --timeout=5s --start-period=2s --retries=3 CMD [ "/healthcheck","http://localhost:8080/healthz" ]
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/anonymousoverflow"]
|
Loading…
Add table
Reference in a new issue