Skip to content

Commit

Permalink
Add/adjust api and metric endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
nemchik committed Feb 12, 2023
1 parent 1228f6e commit a3ba31a
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 32 deletions.
26 changes: 25 additions & 1 deletion authelia.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your authelia container is named authelia
# make sure that your dns has a cname set for authelia
# the default authelia-server and authelia-location confs included with swag rely on
Expand Down Expand Up @@ -26,4 +26,28 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/authelia)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app authelia;
set $upstream_port 9091;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/authelia)?/metrics {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app authelia;
set $upstream_port 9959;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}
}
26 changes: 25 additions & 1 deletion authentik.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your authentik container is named authentik-server
# make sure that your dns has a cname set for authentik

Expand All @@ -22,4 +22,28 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/authentik)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app authentik-server;
set $upstream_port 9000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/authentik)?/metrics {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app authentik-server;
set $upstream_port 9300;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}
}
8 changes: 1 addition & 7 deletions flexget.subfolder.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your flexget container is named flexget
# make sure that flexget is set to work with the base url /flexget/
# make sure to set 'base_url: /flexget' under your flexget's config.yml web_server block
Expand All @@ -21,12 +21,6 @@ location ^~ /flexget/ {
# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;

# enable for Authelia (requires authelia-server.conf in the server block)
#include /config/nginx/authelia-location.conf;

# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;

include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app flexget;
Expand Down
26 changes: 25 additions & 1 deletion grafana.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your grafana container is named grafana
# make sure that your dns has a cname set for grafana

Expand Down Expand Up @@ -46,4 +46,28 @@ server {
#proxy_set_header Authorization "";

}

location ~ (/grafana)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app grafana;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/grafana)?/metrics {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app grafana;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}
}
36 changes: 35 additions & 1 deletion grafana.subfolder.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your grafana container is named grafana
# make sure that grafana is set to work with the base url /grafana/
# grafana requires environment variables set thus:
Expand Down Expand Up @@ -33,3 +33,37 @@ location ^~ /grafana/ {
rewrite ^/grafana/(.*)$ /$1 break;

}

location ^~ /grafana/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_grafana grafana;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass http://$upstream_grafana:$upstream_port ;

# Clear Authorization Header if you are using http auth and normal Grafana auth
#proxy_set_header Authorization "";

rewrite ^/grafana/(.*)$ /$1 break;

}

location ^~ /grafana/metrics {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_grafana grafana;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass http://$upstream_grafana:$upstream_port ;

# Clear Authorization Header if you are using http auth and normal Grafana auth
#proxy_set_header Authorization "";

rewrite ^/grafana/(.*)$ /$1 break;

}
4 changes: 2 additions & 2 deletions grocy.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your grocy container is named grocy
# make sure that your dns has a cname set for grocy

Expand Down Expand Up @@ -44,7 +44,7 @@ server {

}

location /api {
location ~ (/grocy)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app grocy;
Expand Down
12 changes: 11 additions & 1 deletion overseerr.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your overseerr container is named overseerr
# make sure that your dns has a cname set for overseerr

Expand Down Expand Up @@ -43,4 +43,14 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/overseerr)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app overseerr;
set $upstream_port 5055;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}
}
17 changes: 2 additions & 15 deletions portainer.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your portainer container is named portainer
# make sure that your dns has a cname set for portainer

Expand Down Expand Up @@ -45,20 +45,7 @@ server {
proxy_hide_header X-Frame-Options; # Possibly not needed after Portainer 1.20.0
}

location /api/websocket/ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

# enable for ldap auth (requires ldap-server.conf in the server block)
#include /config/nginx/ldap-location.conf;

# enable for Authelia (requires authelia-server.conf in the server block)
#include /config/nginx/authelia-location.conf;

# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;

location ~ (/portainer)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app portainer;
Expand Down
4 changes: 2 additions & 2 deletions portainer.subfolder.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your portainer container is named portainer
# portainer does not require a base url setting

Expand Down Expand Up @@ -31,7 +31,7 @@ location ^~ /portainer/ {
proxy_hide_header X-Frame-Options; # Possibly not needed after Portainer 1.20.0
}

location ^~ /portainer/api/websocket/ {
location ^~ /portainer/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app portainer;
Expand Down
40 changes: 39 additions & 1 deletion prometheus.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your prometheus container is named prometheus
# make sure that your dns has a cname set for prometheus

Expand Down Expand Up @@ -43,4 +43,42 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/prometheus)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app prometheus;
set $upstream_port 9090;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/prometheus)?/-/(healthy|ready|reload|quit) {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app prometheus;
set $upstream_port 9090;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}

location ~ (/prometheus)?/metrics {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app prometheus;
set $upstream_port 9090;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}
}

0 comments on commit a3ba31a

Please sign in to comment.