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
619 B

  1. FROM python:3.9-slim
  2. RUN useradd --system hc
  3. ENV PYTHONUNBUFFERED=1
  4. ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
  5. WORKDIR /opt/healthchecks
  6. RUN apt update && apt install -y libpq-dev build-essential && rm -rf /var/apt/cache
  7. COPY requirements.txt /tmp
  8. RUN \
  9. pip install --no-cache-dir -r /tmp/requirements.txt && \
  10. pip install uwsgi
  11. COPY . /opt/healthchecks/
  12. RUN \
  13. rm -f /opt/healthchecks/hc/local_settings.py && \
  14. DEBUG=False SECRET_KEY=build-key ./manage.py collectstatic --noinput && \
  15. DEBUG=False SECRET_KEY=build-key ./manage.py compress
  16. USER hc
  17. CMD [ "uwsgi", "/opt/healthchecks/docker/uwsgi.ini"]