From 88be97d860f3d73c923fe1a160c19386ec3e118c Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Wed, 14 Jan 2026 23:55:50 -0300 Subject: [PATCH] health: add nginx main config --- services/health/config/nginx-main.conf | 22 ++++++++++++++++++++++ services/health/kustomization.yaml | 1 + services/health/wger-deployment.yaml | 5 ++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 services/health/config/nginx-main.conf diff --git a/services/health/config/nginx-main.conf b/services/health/config/nginx-main.conf new file mode 100644 index 0000000..81a5e1f --- /dev/null +++ b/services/health/config/nginx-main.conf @@ -0,0 +1,22 @@ +worker_processes auto; +pid /tmp/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + access_log /dev/stdout main; + error_log /dev/stderr warn; + + sendfile on; + keepalive_timeout 65; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/services/health/kustomization.yaml b/services/health/kustomization.yaml index c4dd47e..9d21923 100644 --- a/services/health/kustomization.yaml +++ b/services/health/kustomization.yaml @@ -18,6 +18,7 @@ configMapGenerator: - name: wger-nginx-config files: - default.conf=config/nginx.conf + - nginx.conf=config/nginx-main.conf - name: wger-user-sync-script files: - wger_user_sync.py=scripts/wger_user_sync.py diff --git a/services/health/wger-deployment.yaml b/services/health/wger-deployment.yaml index c2d3de5..56a29a4 100644 --- a/services/health/wger-deployment.yaml +++ b/services/health/wger-deployment.yaml @@ -192,7 +192,7 @@ spec: - nginx args: - -g - - daemon off; pid /tmp/nginx.pid; + - daemon off; ports: - name: http containerPort: 8080 @@ -204,6 +204,9 @@ spec: - name: wger-nginx-config mountPath: /etc/nginx/conf.d/default.conf subPath: default.conf + - name: wger-nginx-config + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf - name: wger-static mountPath: /wger/static - name: wger-media