Files
prometheus-android-exporter/server/configuration/nginx.conf
2023-04-18 18:11:45 +02:00

67 lines
1.3 KiB
Nginx Configuration File

# nginx configuration for pushprox, grafana and prometheus
http{
# Needed for grafana websockets
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# Upstream server definitions
upstream prometheus{
server prometheus:9090;
}
upstream pushprox{
server pushprox:8080;
}
upstream grafana{
server grafana:3000;
}
# Grafana server configuration
server {
listen 3000;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
proxy_set_header Host $http_host;
proxy_pass http://grafana;
}
# Proxy Grafana Live WebSocket connections
location /api/live/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
proxy_pass http://grafana;
}
}
# PushProx server configuration
server {
listen 8080;
location / {
proxy_pass http://pushprox;
}
}
# Prometheus UI server configuration
server {
listen 9090;
location / {
proxy_pass http://prometheus;
}
}
}
events {
worker_connections 1024;
}