From b20525171beb9ec25c15f8287a1edabac4c9545b Mon Sep 17 00:00:00 2001 From: bbk Date: Sun, 26 May 2024 11:18:47 +0200 Subject: [PATCH 1/5] increase nginx timeout / remove inexisting error page handler --- charts/wger/templates/configmap.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/wger/templates/configmap.yaml b/charts/wger/templates/configmap.yaml index 0eaed69..6e91130 100644 --- a/charts/wger/templates/configmap.yaml +++ b/charts/wger/templates/configmap.yaml @@ -19,9 +19,15 @@ data: keepalive 2; } + # if no Host match, close the connection to prevent host spoofing + server { + listen 80 default_server; + return 444; + } + # webserver server { - listen 8080; + listen 8080 deferred; client_max_body_size 4G; # set the correct host(s) for your site @@ -58,18 +64,12 @@ data: proxy_buffers 64 4k; proxy_max_temp_file_size 0; - # send 500 when timeout - proxy_next_upstream error timeout http_500; + # give gunicorn time to process + proxy_read_timeout 1800; proxy_redirect off; proxy_pass http://app_server; } - - # error handling - error_page 500 502 503 504 /500.html; - location = /500.html { - root /var/www/html/; - } } {{- end }} --- From 8bb58773adb6460254ad1b5f4456c8b83409b10e Mon Sep 17 00:00:00 2001 From: bbk Date: Sun, 26 May 2024 11:19:39 +0200 Subject: [PATCH 2/5] mention DJANGO_ADMINS env --- charts/wger/templates/_helpers.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/wger/templates/_helpers.tpl b/charts/wger/templates/_helpers.tpl index c3f2112..9f675e9 100644 --- a/charts/wger/templates/_helpers.tpl +++ b/charts/wger/templates/_helpers.tpl @@ -24,6 +24,9 @@ environment: value: "test@test.com" - name: EMAIL_BACKEND value: "django.core.mail.backends.console.EmailBackend" + # Set your name and email to be notified if an internal server error occurs. + #- name: DJANGO_ADMINS + # value: "SysAdmin, admin@test.com" # django db - name: DJANGO_PERFORM_MIGRATIONS value: "True" From 71bf0fd6d8a7ce657faaa5ce7a789ef11ab84c2e Mon Sep 17 00:00:00 2001 From: bbk Date: Sun, 26 May 2024 11:20:40 +0200 Subject: [PATCH 3/5] mention DJANGO_ADMINS env --- example/prod_values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/prod_values.yaml b/example/prod_values.yaml index e2186cc..72ec03e 100644 --- a/example/prod_values.yaml +++ b/example/prod_values.yaml @@ -49,6 +49,8 @@ app: value: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" - name: FROM_EMAIL value: "fit@example.com" + - name: DJANGO_ADMINS + value: "SysAdmin, admin@test.com - name: GUNICORN_CMD_ARGS value: "--timeout 240 --workers 2 --worker-class gthread --threads 3 --forwarded-allow-ips * --proxy-protocol True --access-logformat='%(h)s %(l)s %({client-ip}i)s %(l)s %({x-real-ip}i)s %(l)s %({x-forwarded-for}i)s %(l)s %(t)s \"%(r)s\" %(s)s %(b)s \"%(f)s\" \"%(a)s\"' --access-logfile - --error-logfile -" From e572aebe75fbae3959275d9a28b1887b12c9ff72 Mon Sep 17 00:00:00 2001 From: bbk Date: Sun, 26 May 2024 11:21:03 +0200 Subject: [PATCH 4/5] bump version --- charts/wger/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/wger/Chart.yaml b/charts/wger/Chart.yaml index 97ba2f6..fa39e5f 100644 --- a/charts/wger/Chart.yaml +++ b/charts/wger/Chart.yaml @@ -1,6 +1,6 @@ --- apiVersion: v2 -version: 0.2.0-rc.1 +version: 0.2.0-rc.2 appVersion: latest name: wger description: A Helm chart for Wger installation on Kubernetes From 6897a1110ed7970311b18cb1a2415e47752c906b Mon Sep 17 00:00:00 2001 From: bbk Date: Sun, 26 May 2024 11:43:48 +0200 Subject: [PATCH 5/5] release 0.2.0 --- charts/wger/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/wger/Chart.yaml b/charts/wger/Chart.yaml index fa39e5f..0b55cad 100644 --- a/charts/wger/Chart.yaml +++ b/charts/wger/Chart.yaml @@ -1,6 +1,6 @@ --- apiVersion: v2 -version: 0.2.0-rc.2 +version: 0.2.0 appVersion: latest name: wger description: A Helm chart for Wger installation on Kubernetes