This repository was archived by the owner on Jul 17, 2024. It is now read-only.
Commit 84122e4 1 parent 21db93c commit 84122e4 Copy full SHA for 84122e4
File tree 2 files changed +20
-8
lines changed
2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -2,26 +2,32 @@ server {
2
2
listen 5005 ;
3
3
4
4
5
- location /collect {
6
- proxy_pass_request_headers on ;
7
- proxy_pass_request_body on ;
8
- proxy_pass http://alloy:8027/collect;
9
- proxy_set_header Host $host ;
5
+ location /grafana {
6
+ rewrite ^/grafana(.*)$ $1 break;
7
+ proxy_pass http://grafana:3000;
8
+ proxy_set_header Host $http_host ;
10
9
proxy_set_header X-Real-IP $remote_addr ;
11
10
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
12
11
proxy_set_header X-Forwarded-Proto $scheme ;
12
+
13
+ # Required for Grafana Live WebSocket connections
14
+ proxy_http_version 1.1 ;
15
+ proxy_set_header Upgrade $http_upgrade ;
16
+ proxy_set_header Connection "upgrade" ;
13
17
}
14
-
15
18
16
- location /grafana {
19
+
20
+ location /collect {
17
21
proxy_pass_request_headers on ;
18
22
proxy_pass_request_body on ;
19
- proxy_pass http://grafana:3000 ;
23
+ proxy_pass http://alloy:8027/collect ;
20
24
proxy_set_header Host $host ;
21
25
proxy_set_header X-Real-IP $remote_addr ;
22
26
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
23
27
proxy_set_header X-Forwarded-Proto $scheme ;
24
28
}
29
+
30
+
25
31
26
32
location / {
27
33
root /usr/share/nginx/html/;
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ services:
43
43
environment :
44
44
GF_SECURITY_ADMIN_PASSWORD : " ${GF_SECURITY_ADMIN_PASSWORD}"
45
45
GF_SECURITY_ADMIN_USER : " ${GF_SECURITY_ADMIN_USER}"
46
+ GF_SERVER_ROOT_URL : " http://${DOMAIN}/grafana/"
47
+ GF_SERVER_SERVE_FROM_SUB_PATH : " true"
48
+ # GF_SERVER_DOMAIN: ${DOMAIN}
49
+ # GF_SERVER_ENFORCE_DOMAIN: "false"
50
+ # GF_SERVER_HTTP_PORT: "3000"
51
+ # GF_SERVER_HTTP_ADDR: "0.0.0.0"
46
52
47
53
loki :
48
54
build :
You can’t perform that action at this time.
0 commit comments