From 8a17ded5c3d92c38914773deb8e7704bfbc0ab42 Mon Sep 17 00:00:00 2001 From: The0Mikkel Date: Sat, 28 Oct 2023 18:08:28 +0000 Subject: [PATCH] Added NGINX metrics endpoint in seperate site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: William Bergmann Børresen --- Dockerfile | 1 + overlay/etc/nginx/sites-available/30_metrics.conf | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 overlay/etc/nginx/sites-available/30_metrics.conf diff --git a/Dockerfile b/Dockerfile index 54a6495..5da213a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,7 @@ RUN rm /etc/nginx/sites-enabled/* /etc/nginx/stream-enabled/* ;\ mkdir -p /etc/nginx/sites-enabled ;\ ln -s /etc/nginx/sites-available/10_cache.conf /etc/nginx/sites-enabled/10_generic.conf; \ ln -s /etc/nginx/sites-available/20_upstream.conf /etc/nginx/sites-enabled/20_upstream.conf; \ + ln -s /etc/nginx/sites-available/30_metrics.conf /etc/nginx/sites-enabled/30_metrics.conf; \ ln -s /etc/nginx/stream-available/10_sni.conf /etc/nginx/stream-enabled/10_sni.conf; \ mkdir -m 755 -p /data/cachedomains ;\ mkdir -m 755 -p /tmp/nginx diff --git a/overlay/etc/nginx/sites-available/30_metrics.conf b/overlay/etc/nginx/sites-available/30_metrics.conf new file mode 100644 index 0000000..6a6581d --- /dev/null +++ b/overlay/etc/nginx/sites-available/30_metrics.conf @@ -0,0 +1,9 @@ +# Metrics endpoint + +server { + listen 8080 reuseport; + + location = /nginx_status { + stub_status; + } +}