Skip to content

Commit

Permalink
Merge pull request #30 from crazy-max/update
Browse files Browse the repository at this point in the history
Healthchecks 3.1
  • Loading branch information
crazy-max committed Dec 30, 2023
2 parents 1ac1654 + 67066fd commit b6ef3bf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
45 changes: 28 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
ARG HEALTHCHECKS_VERSION=2.1
# syntax=docker/dockerfile:1

FROM crazymax/yasu:latest AS yasu
FROM crazymax/alpine-s6-dist:3.17-2.2.0.3 AS s6
FROM python:3.10-alpine3.17
ARG HEALTHCHECKS_VERSION=3.1
ARG ALPINE_VERSION=3.18
ARG S6_VERSION=2.2.0.3
ARG PYTHON_VERSION=3.12

ENV TZ="UTC" \
PUID="1000" \
PGID="1000"
FROM crazymax/yasu:latest AS yasu
FROM crazymax/alpine-s6-dist:${ALPINE_VERSION}-${S6_VERSION} AS s6

FROM --platform=${BUILDPLATFORM} alpine:${ALPINE_VERSION} AS src
RUN apk add --update git
WORKDIR /src
RUN git init . && git remote add origin "https://github.com/healthchecks/healthchecks"
ARG HEALTHCHECKS_VERSION
RUN git fetch origin "v${HEALTHCHECKS_VERSION}" && git checkout -q FETCH_HEAD

FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
COPY --from=s6 / /
COPY --from=yasu / /
COPY --from=src /src /opt/healthchecks

WORKDIR /opt/healthchecks
RUN apk --update --no-cache add \
bash \
bearssl \
Expand All @@ -32,6 +44,7 @@ RUN apk --update --no-cache add \
cairo \
cairo-dev \
cargo \
curl-dev \
gcc \
git \
jansson-dev \
Expand All @@ -47,28 +60,26 @@ RUN apk --update --no-cache add \
postgresql-dev \
python3-dev \
zlib-dev \
&& mkdir -p ~/.cargo/registry/index \
&& cd ~/.cargo/registry/index \
&& git clone --bare https://github.com/rust-lang/crates.io-index.git github.com-1285ae84e5963aae \
&& cd /opt \
&& git clone --branch v${HEALTHCHECKS_VERSION} "https://github.com/healthchecks/healthchecks" healthchecks \
&& cd healthchecks \
&& python -m pip install --upgrade pip \
&& pip install apprise minio mysqlclient uwsgi \
&& PYTHONUNBUFFERED=1 pip install --upgrade --no-cache-dir -r requirements.txt \
&& touch hc/local_settings.py \
&& apk del build-dependencies \
&& rm -rf /opt/healthchecks/.git /root/.cache /root/.cargo /tmp/*
&& rm -rf /opt/healthchecks/.git\
/root/.cache \
/root/.cargo \
/tmp/*

COPY --from=s6 / /
COPY --from=yasu / /
COPY rootfs /

ENV TZ="UTC" \
PUID="1000" \
PGID="1000"

RUN addgroup -g ${PGID} healthchecks \
&& adduser -D -H -u ${PUID} -G healthchecks -s /bin/sh healthchecks

EXPOSE 8000 2500
WORKDIR /opt/healthchecks
VOLUME [ "/data" ]

ENTRYPOINT [ "/init" ]
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ docker compose up -d

## Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You
can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) or by making
a [Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely!
Want to contribute? Awesome! The most basic way to show your support is to star
the project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max)
or by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this
journey continues indefinitely!

Thanks again for your support, it is much appreciated! :pray:

Expand Down

0 comments on commit b6ef3bf

Please sign in to comment.