docker-healthchecks/Dockerfile

24 lines
684 B
Docker

FROM python:3.10
ARG VERSION
ENV PYTHONUNBUFFERED=1
WORKDIR /opt/healthchecks
RUN useradd --system hc && \
git clone --depth 1 --branch v${VERSION} https://github.com/healthchecks/healthchecks.git /opt/healthchecks && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /opt/healthchecks/requirements.txt && \
pip install --no-cache-dir uwsgi && \
rm -f /opt/healthchecks/hc/local_settings.py && \
DEBUG=False SECRET_KEY=build-key ./manage.py collectstatic --noinput && \
DEBUG=False SECRET_KEY=build-key ./manage.py compress
COPY uwsgi.ini /opt/healthchecks/docker/uwsgi.ini
USER hc
VOLUME "/data"
EXPOSE 2525
EXPOSE 8000