commit 81829710f40cd1cecc0c1671392c7d1f88b19ba5 Author: Jeffrey C. Ollie Date: Wed Feb 17 23:52:03 2021 -0600 first commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..bde5686 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,26 @@ +--- +kind: secret +name: docker_username +get: + path: docker + name: username +--- +kind: secret +name: docker_password +get: + path: docker + name: password +--- +kind: pipeline +type: kubernetes +name: build +steps: + - name: publish + image: plugins/docker + settings: + repo: jcollie/healthchecks + username: + from_secret: username + password: + from_secret: password + auto_tag: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..08048a1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.9 + +ENV PYTHONUNBUFFERED=1 +WORKDIR /opt/healthchecks + +RUN useradd --system hc && \ + git clone --depth 1 --branch v1.19.0 https://github.com/healthchecks/healthchecks.git /opt/healthchecks && \ + 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 diff --git a/uwsgi.ini b/uwsgi.ini new file mode 100644 index 0000000..63801e4 --- /dev/null +++ b/uwsgi.ini @@ -0,0 +1,15 @@ +[uwsgi] +master +die-on-term +http-socket = :8000 +harakiri = 10 +post-buffering = 4096 +processes = 4 +enable-threads +threads = 1 +chdir = /opt/healthchecks +module = hc.wsgi:application +thunder-lock +disable-write-exception +static-map = /static=/opt/healthchecks/static-collected +buffer-size = 32768