mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-03-14 12:22:52 +00:00

Instead of using SCRIPT_NAME / FORCE_SCRIPT_NAME, PATH_INFO and their associated issues, update urls.py to add the subpath to all routes. This allows us to get rid of several hacks: * the uwsgi.ini magic which parses SITE_ROOT, sets SCRIPT_NAME and fixes PATH_INFO * set_script_prefix() in sendalerts * chopping the subpath off an URL in hc.accounts.views._allow_redirect The idea comes from @apollo13 in https://code.djangoproject.com/ticket/35985#comment:5 cc: #1091
36 lines
830 B
INI
36 lines
830 B
INI
[uwsgi]
|
|
strict
|
|
master
|
|
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 = /opt/healthchecks
|
|
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 =
|