Replaces the hand-written lex routers with one $multi entry (git:3000, git-sso + lex-page + no-cache); lex-page now rewrites every lex path to the dossier page so Gitea's own pages never appear there.
65 lines
4.6 KiB
Nginx Configuration File
65 lines
4.6 KiB
Nginx Configuration File
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Docker's DNS, so a recreated container is picked up without a reload.
|
|
resolver 127.0.0.11 valid=10s ipv6=off;
|
|
|
|
# CORS for theme assets (loaded cross-origin by themed services)
|
|
location ~* \.(css|svg|png|ico)$ {
|
|
add_header Access-Control-Allow-Origin "*";
|
|
add_header Access-Control-Allow-Methods "GET, OPTIONS";
|
|
add_header Cache-Control "public, max-age=3600";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# LEAD living-review releases (BagIt bags). Only on the reach host:
|
|
# traefik routes reach.<domain>/releases here behind git-sso; the
|
|
# public dashboard host never serves them.
|
|
location /releases/ {
|
|
if ($host !~* "^reach\.") { return 404; }
|
|
alias /usr/share/nginx/releases/;
|
|
autoindex on;
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
|
|
# Service health for the landing panels. The Gitea home fetches these
|
|
# cross-origin, so the status code has to be readable from any host.
|
|
# Each name is one fixed upstream. Nothing here is an open proxy.
|
|
location = /healthz/llm { set $up llm:8000; rewrite ^ /health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/bcda { set $up bcda:8501; rewrite ^ /_stcore/health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/lead { set $up lead:8501; rewrite ^ /_stcore/health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/reach { set $up lead:8501; rewrite ^ /_stcore/health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/lex { set $up git:3000; rewrite ^ /assets/dossier/index.html break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/traefik { set $up traefik:8080; rewrite ^ /api/version break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/s3console { set $up rustfs:9001; rewrite ^ /health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/git { set $up git:3000; rewrite ^ /api/healthz break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/notebooks { set $up notebooks:2718; rewrite ^ /health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/zotero { set $up zotero:8080; rewrite ^ / break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/docs { set $up docs:80; rewrite ^ / break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/nessie { set $up nessie:19120; rewrite ^ /api/v2/config break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/trino { set $up trino:8080; rewrite ^ /v1/info break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/polaris { set $up polaris:8182; rewrite ^ /q/health/ready break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/grafana { set $up grafana:3000; rewrite ^ /api/health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/tempo { set $up tempo:3200; rewrite ^ /ready break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/prometheus { set $up prometheus:9090; rewrite ^ /-/healthy break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/loki { set $up loki:3100; rewrite ^ /ready break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
location = /healthz/api { set $up api:8000; rewrite ^ /health break; proxy_pass http://$up; include /etc/nginx/healthz-headers.conf; }
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|
|
}
|