blob: 97c6f960104d2ca0135fe51ece9e40b39f5faa05 [file] [log] [blame]
server {
listen 4000;
server_name localhost;
${SERVER_CONF}
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri /index.html;
}
location /api/ {
resolver ${DNS} valid=${DNS_VALID};
resolver_timeout 3s;
set $target "${DEVLAKE_ENDPOINT}";
rewrite /api/(.*) /$1 break;
proxy_send_timeout 10s;
proxy_read_timeout 10s;
proxy_pass http://$target;
}
location /grafana/ {
resolver ${DNS} valid=${DNS_VALID};
resolver_timeout 3s;
set $target "${GRAFANA_ENDPOINT}";
rewrite /grafana/(.*) /$1 break;
proxy_set_header Authorization "";
proxy_send_timeout 10s;
proxy_read_timeout 10s;
proxy_pass http://$target;
}
}