Страница отчётов reports и встраивание визуализатора под /viz/ за входом Keycloak
All checks were successful
ci / test (push) Successful in 18s
ci / deploy (push) Successful in 1m17s

Новый package reports: статический список ссылок (khbuild_process - Гант и
ARIS), порт 8087, добавлен в deploy.sh. Визуализатор открывается под префиксом
/viz/ (относительные адреса, ?view=gantt|aris, возврат к списку). Для хоста
reports.khbuild.freeddns.org: nginx, oauth2-proxy и клиент Keycloak
reports-proxy настроены под root, справочные копии - deploy/infra/.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 08:57:58 +03:00
parent c9b1416624
commit 6cd15331f5
28 changed files with 451 additions and 10 deletions

View File

@@ -0,0 +1,76 @@
# reports.khbuild.freeddns.org: список отчётов и визуализации.
# Все пути закрыты входом Keycloak (Google) через oauth2-proxy khbuild-oauth2-proxy-reports (127.0.0.1:4181), группа /it-admins.
# / -> пакет reports (127.0.0.1:8087), статический список ссылок
# /viz/ -> пакет khbuild_process_viz (127.0.0.1:8086); токен сервиса добавляется здесь из khbuild-secrets, в браузер он не попадает
server {
listen 80;
listen [::]:80;
server_name reports.khbuild.freeddns.org;
location ^~ /.well-known/acme-challenge/ { root /var/www/certbot; }
location / { return 301 https://$host$request_uri; }
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name reports.khbuild.freeddns.org;
ssl_certificate /etc/letsencrypt/live/khbuild-reports/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/khbuild-reports/privkey.pem;
client_max_body_size 1m;
location = /oauth2/auth {
proxy_buffer_size 16k;
proxy_buffers 8 16k;
proxy_busy_buffers_size 32k;
proxy_pass http://127.0.0.1:4181;
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 https;
proxy_set_header X-Auth-Request-Redirect $scheme://$host$request_uri;
}
location /oauth2/ {
proxy_buffer_size 16k;
proxy_buffers 8 16k;
proxy_busy_buffers_size 32k;
proxy_pass http://127.0.0.1:4181;
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 https;
proxy_set_header X-Auth-Request-Redirect $scheme://$host$request_uri;
}
location = /viz { return 301 /viz/; }
location /viz/ {
auth_request /oauth2/auth;
error_page 401 = /oauth2/start?rd=$scheme://$host$request_uri;
auth_request_set $auth_email $upstream_http_x_auth_request_email;
proxy_set_header X-Forwarded-Email $auth_email;
include /etc/nginx/khbuild-secrets/reports-viz-token.conf;
proxy_pass http://127.0.0.1:8086/;
proxy_http_version 1.1;
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 https;
proxy_read_timeout 120;
}
location / {
auth_request /oauth2/auth;
error_page 401 = /oauth2/start?rd=$scheme://$host$request_uri;
auth_request_set $auth_email $upstream_http_x_auth_request_email;
proxy_set_header X-Forwarded-Email $auth_email;
proxy_pass http://127.0.0.1:8087;
proxy_http_version 1.1;
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 https;
}
}