enable basic auth
This commit is contained in:
parent
ab6950cc2a
commit
8c2718dc89
4
abra.sh
4
abra.sh
|
@ -1,4 +1,4 @@
|
|||
export PROMTAIL_YML_VERSION=v2
|
||||
export NODE_EXPORTER_ENTRYPOINT_VERSION=v1
|
||||
export NGINX_CONFIG_VERSION=v9
|
||||
export HTPASSWD_CONFIG_VERSION=v1
|
||||
export NGINX_CONFIG_VERSION=v11
|
||||
export HTPASSWD_CONFIG_VERSION=v2
|
||||
|
|
|
@ -3,7 +3,7 @@ version: "3.8"
|
|||
|
||||
services:
|
||||
app:
|
||||
image: nginx:1.20.0
|
||||
image: nginx:1.20.0-alpine
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
user www-data;
|
||||
#user www-data;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
|
@ -13,14 +13,20 @@ http {
|
|||
resolver 127.0.0.11;
|
||||
|
||||
location ~ ^/node_exporter(.*)$ {
|
||||
auth_basic "admin";
|
||||
auth_basic_user_file /etc/nginx/conf.d/.htpasswd;
|
||||
proxy_pass http://{{ env "STACK_NAME" }}_node_exporter:9100$1;
|
||||
}
|
||||
|
||||
location ~ ^/cadvisor(.*)$ {
|
||||
auth_basic "admin";
|
||||
auth_basic_user_file /etc/nginx/conf.d/.htpasswd;
|
||||
proxy_pass http://{{ env "STACK_NAME" }}_cadvisor:8080$1;
|
||||
}
|
||||
|
||||
location ~ ^/promtail(.*)$ {
|
||||
auth_basic "admin";
|
||||
auth_basic_user_file /etc/nginx/conf.d/.htpasswd;
|
||||
proxy_pass http://{{ env "STACK_NAME" }}_promtail:9080$1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue