add nginx caching proxy for Homepage widget API requests

Stale-while-revalidate cache in front of Homepage reduces first-paint
latency by serving cached /api/ responses instantly while refreshing
upstream in background. Non-API paths pass through uncached.
This commit is contained in:
Viktor Barzin 2026-03-07 21:06:51 +00:00
parent aeee51a1a3
commit 0d03037393
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 116 additions and 20 deletions

View file

@ -22,27 +22,10 @@ controller:
maxSurge: 25%
maxUnavailable: 25%
# Enable the ingress to expose Homepage to the network.
# Ingress managed by ingress_factory module in main.tf (routes through caching proxy)
ingress:
main:
enabled: true
labels:
gethomepage.dev/enabled: "true"
annotations:
gethomepage.dev/name: "Homepage"
gethomepage.dev/description: "Service dashboard"
gethomepage.dev/group: "Core Platform"
gethomepage.dev/icon: "homepage.png"
ingressClassName: "traefik"
hosts:
- host: &host "home.viktorbarzin.me"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
secretName: ${tls_secret_name}
enabled: false
# All the config files for Homepage can be specified under their relevant config block.
config: