summaryrefslogtreecommitdiff
path: root/sysutils/py-healthchecks/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/py-healthchecks/files')
-rw-r--r--sysutils/py-healthchecks/files/hcks.in12
-rw-r--r--sysutils/py-healthchecks/files/patch-hc_lib_webauthn.py11
-rw-r--r--sysutils/py-healthchecks/files/pkg-message.in22
-rw-r--r--sysutils/py-healthchecks/files/uwsgi.ini.in35
4 files changed, 80 insertions, 0 deletions
diff --git a/sysutils/py-healthchecks/files/hcks.in b/sysutils/py-healthchecks/files/hcks.in
new file mode 100644
index 000000000000..bad9800f4b1b
--- /dev/null
+++ b/sysutils/py-healthchecks/files/hcks.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+args=
+for arg in "$@" ; do
+ if [ "${arg#* }" != "${arg}" ] ; then
+ args="${args} '${arg}'"
+ else
+ args="${args} ${arg}"
+ fi
+done
+
+su -m healthchecks -c "%%HOMEDIR%%/manage.py ${args}"
diff --git a/sysutils/py-healthchecks/files/patch-hc_lib_webauthn.py b/sysutils/py-healthchecks/files/patch-hc_lib_webauthn.py
new file mode 100644
index 000000000000..24494bdf19db
--- /dev/null
+++ b/sysutils/py-healthchecks/files/patch-hc_lib_webauthn.py
@@ -0,0 +1,11 @@
+--- hc/lib/webauthn.py.orig 2025-06-11 05:51:38 UTC
++++ hc/lib/webauthn.py
+@@ -14,8 +14,6 @@ from fido2.webauthn import (
+ UserVerificationRequirement,
+ )
+
+-fido2.features.webauthn_json_mapping.enabled = True
+-
+
+ class CreateHelper:
+ def __init__(self, rp_id: str, credentials: Iterable[bytes]):
diff --git a/sysutils/py-healthchecks/files/pkg-message.in b/sysutils/py-healthchecks/files/pkg-message.in
new file mode 100644
index 000000000000..62bf96d135ad
--- /dev/null
+++ b/sysutils/py-healthchecks/files/pkg-message.in
@@ -0,0 +1,22 @@
+[
+{ type: install
+ message: <<EOM
+Healthchecks is located in its home directory %%HOMEDIR%% and can be run like any
+Django application using 'hcks runserver' but for production use it is recommended
+to use uWSGI or Gunicorn.
+
+If you plan to use uWSGI, install www/uwsgi and configure in your rc.conf(5):
+
+ sysrc uwsgi_enable="YES"
+ sysrc uwsgi_procname="uWSGI"
+ sysrc uwsgi_profiles="hc"
+ sysrc uwsgi_hc_socket="/var/run/healthchecks/hc.sock"
+ sysrc uwsgi_hc_socket_owner="healthchecks:www"
+ sysrc uwsgi_hc_uid="healthchecks"
+ sysrc uwsgi_hc_gid="healthchecks"
+ sysrc uwsgi_hc_configfile="%%EXAMPLESDIR%%/uwsgi.ini"
+ sysrc uwsgi_hc_pidfile="/var/run/healthchecks/hc.pid"
+ sysrc uwsgi_hc_logfile="/var/log/healthchecks/hc.log"
+EOM
+}
+]
diff --git a/sysutils/py-healthchecks/files/uwsgi.ini.in b/sysutils/py-healthchecks/files/uwsgi.ini.in
new file mode 100644
index 000000000000..06b1f09a59bc
--- /dev/null
+++ b/sysutils/py-healthchecks/files/uwsgi.ini.in
@@ -0,0 +1,35 @@
+[uwsgi]
+strict
+die-on-term
+http-socket = :8000
+harakiri = 10
+buffer-size = 32768
+post-buffering = 16192
+processes = 4
+if-env = UWSGI_PROCESSES
+processes = %(_)
+endif =
+auto-procname
+enable-threads
+threads = 1
+chdir = %%HOMEDIR%%
+module = hc.wsgi:application
+thunder-lock
+disable-write-exception
+
+# workaround for https://github.com/unbit/uwsgi/issues/2299
+max-fd = 10000
+
+# compression
+check-static = static-collected/
+static-gzip-dir = static-collected/CACHE
+
+# Note: manage.py migrate will also run system checks
+hook-pre-app = exec:./manage.py migrate
+# Use "--skip-checks" to avoid running same checks 3 times
+attach-daemon = ./manage.py sendalerts --skip-checks
+attach-daemon = ./manage.py sendreports --loop --skip-checks
+
+if-env = SMTPD_PORT
+attach-daemon = ./manage.py smtpd --port %(_) --skip-checks
+endif =