-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: nginx reverse proxy; fix: image tag
* Adds a second container to the deploy with an nginx reverse proxy that provides HTTP basic auth to the Prometheus metrics exporter. * Fixes the container image names so as to include the Github commit sha
- Loading branch information
Showing
10 changed files
with
97 additions
and
9 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
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
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 |
---|---|---|
|
@@ -20,3 +20,5 @@ DB_PORT= | |
DB_NAME= | ||
DB_SSL_MODE=require | ||
DB_CONNECTION_TIMEOUT=30 | ||
|
||
PROM_NGINX_REVERSE_PROXY_PASSWORD= |
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,3 @@ | ||
FROM nginx | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
COPY htpasswd /etc/nginx/htpasswd |
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,46 @@ | ||
|
||
user nginx; | ||
worker_processes auto; | ||
|
||
error_log /var/log/nginx/error.log notice; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
keepalive_timeout 65; | ||
|
||
gzip on; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
|
||
server { | ||
listen 9158 default_server; | ||
listen [::]:9158 default_server; | ||
|
||
root /var/www/html; | ||
|
||
server_name _; | ||
|
||
location / { | ||
proxy_pass http://localhost:9090; | ||
} | ||
|
||
auth_basic "IATI Bulk Data Service Metrics Exporter"; | ||
auth_basic_user_file htpasswd; | ||
|
||
access_log /var/log/nginx/prometheus-bulk-data-service-exporter-access.log; | ||
error_log /var/log/nginx/prometheus-bulk-data-service-exporter-error.log; | ||
} | ||
} | ||
|