This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from alphagov/add-nginx
use nginx for prometheus basic auth
- Loading branch information
Showing
7 changed files
with
134 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
grafana:$2y$05$KtkeBzc53efo5u10r3A1gexcml34YiMNVtKd8CqaXPEac4hELCERK |
16 changes: 16 additions & 0 deletions
16
terraform/projects/app-ecs-services/config/vhosts/auth-proxy.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
server { | ||
listen 9090 default_server; | ||
auth_basic "Prometheus"; | ||
auth_basic_user_file /etc/nginx/conf.d/.htpasswd; | ||
|
||
location / { | ||
proxy_pass http://prometheus:9090; | ||
} | ||
location /status { | ||
auth_basic off; | ||
proxy_pass http://prometheus:9090/status; | ||
} | ||
location /health { | ||
return 200 "Static health check"; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
terraform/projects/app-ecs-services/config/vhosts/paas-proxy.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
server { | ||
listen 8080; | ||
|
||
location / { | ||
proxy_pass https://$host$uri; | ||
proxy_ssl_server_name on; | ||
proxy_set_header X-CF-APP-INSTANCE $arg_cf_app_guid:$arg_cf_app_instance_index; | ||
proxy_set_header Authorization "Bearer $arg_cf_app_guid"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters