first commit

This commit is contained in:
Jeffrey C. Ollie 2021-02-17 23:52:03 -06:00
commit 81829710f4
Signed by: jeff
GPG key ID: 6F86035A6D97044E
3 changed files with 61 additions and 0 deletions

26
.drone.yml Normal file
View file

@ -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

20
Dockerfile Normal file
View file

@ -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

15
uwsgi.ini Normal file
View file

@ -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