Skip to content

Commit 3831391

Browse files
Expose node-exporter
1 parent 7b98fb2 commit 3831391

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ ADD default.conf /etc/nginx/conf.d/default.template
33
ADD ssl.conf /etc/nginx/shared/
44
ADD proxy.conf /etc/nginx/shared/
55
ADD letsencrypt.conf /etc/nginx/shared/
6+
ADD htpasswd /etc/nginx/shared/
67
CMD /bin/bash -c "envsubst \\\${SERVER_HOSTNAME} < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"

default.conf

+8
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ server {
6262
return 301 $scheme://forum.uspgamedev.org/;
6363
}
6464

65+
location /metrics {
66+
auth_basic "Metrics";
67+
auth_basic_user_file /etc/nginx/shared/htpasswd;
68+
69+
proxy_pass http://node-exporter:9100/metrics;
70+
include /etc/nginx/shared/proxy.conf;
71+
}
72+
6573
include /etc/nginx/shared/letsencrypt.conf;
6674
}
6775

htpasswd

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
metrics:$apr1$6zy9mxjG$2ZJoiONXaJqDEVJ7ljmoX1

0 commit comments

Comments
 (0)