mirror of https://github.com/statping/statping
GH action
parent
9c6233e3e7
commit
56b635dd9b
24
Dockerfile
24
Dockerfile
|
@ -1,24 +1,22 @@
|
||||||
|
FROM statping/statping:base AS base
|
||||||
|
|
||||||
|
# Statping main Docker image that contains all required libraries
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
MAINTAINER "Hunter Long (https://github.com/hunterlong)"
|
RUN apk --no-cache add libgcc libstdc++ ca-certificates curl jq && update-ca-certificates
|
||||||
ARG VERSION
|
|
||||||
ARG ARCH
|
|
||||||
|
|
||||||
RUN apk --no-cache add curl jq
|
COPY --from=base /go/bin/statping /usr/local/bin/
|
||||||
|
COPY --from=base /usr/local/bin/sass /usr/local/bin/
|
||||||
RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \
|
COPY --from=base /usr/local/share/ca-certificates /usr/local/share/
|
||||||
chmod +x /usr/local/bin/sass
|
|
||||||
|
|
||||||
RUN curl -L -O https://github.com/statping/statping/releases/download/v$VERSION/statping-linux-$ARCH.tar.gz && \
|
|
||||||
tar -xzf statping-linux-$ARCH.tar.gz && mv statping /usr/local/bin/ && rm -f statping-linux-$ARCH.tar.gz
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
VOLUME /app
|
|
||||||
|
|
||||||
ENV PORT=8080
|
ENV IS_DOCKER=true
|
||||||
|
ENV SASS=/usr/local/bin/sass
|
||||||
ENV STATPING_DIR=/app
|
ENV STATPING_DIR=/app
|
||||||
|
ENV PORT=8080
|
||||||
|
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --retries=5 CMD curl -s "http://localhost:$PORT/health" | jq -r -e ".online==true"
|
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD curl -s "http://localhost:$PORT/health" | jq -r -e ".online==true"
|
||||||
|
|
||||||
CMD statping --port $PORT
|
CMD statping --port $PORT
|
||||||
|
|
Loading…
Reference in New Issue