This commit is contained in:
2026-04-06 21:36:15 +07:00
commit 35874bf520
29 changed files with 1625 additions and 0 deletions

59
nginx.conf Normal file
View File

@@ -0,0 +1,59 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
resolver 127.0.0.11 valid=10s;
# Loki gateway
server {
listen 3100;
location = /ready {
proxy_pass http://loki-read:3100$request_uri;
}
# Write path
location = /loki/api/v1/push {
proxy_pass http://loki-write:3100$request_uri;
}
# Read path
location ~ /loki/api/.* {
proxy_pass http://loki-read:3100$request_uri;
}
# Ruler
location ~ /api/prom/rules.* {
proxy_pass http://loki-backend:3100$request_uri;
}
location ~ /prometheus/api/v1/rules.* {
proxy_pass http://loki-backend:3100$request_uri;
}
}
# Grafana proxy
server {
listen 3000;
location / {
proxy_pass http://grafana:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Grafana WebSocket (live features)
location /api/live/ {
proxy_pass http://grafana:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
}