You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
626 B

FROM python:3.9-slim-buster
RUN useradd --system hc
ENV PYTHONUNBUFFERED=1
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
WORKDIR /opt/healthchecks
RUN apt update && apt install -y libpq-dev build-essential && rm -rf /var/apt/cache
COPY requirements.txt /tmp
RUN \
pip install --no-cache-dir -r /tmp/requirements.txt && \
pip install uwsgi
COPY . /opt/healthchecks/
RUN \
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
USER hc
CMD [ "uwsgi", "/opt/healthchecks/docker/uwsgi.ini"]