Files
claudeandClaude Opus 5.5 7d6eec8963 Harmony on eom.dev: Supabase + Harmony on Kubernetes, Dex sign-in, Catppuccin, LiveKit
Kubernetes port of Harmony 1.9.6's self-host compose stack (Supabase Postgres,
GoTrue, PostgREST, Realtime, storage-api, imgproxy, Kong; Harmony web,
federation server/worker, Redis, media cache, Caddy router; LiveKit) at
harmony.eom.dev, api.harmony.eom.dev and voice.harmony.eom.dev.

- Dex is the only sign-in (GoTrue custom OIDC provider custom:dex); e-mail
  login off; listed addresses become instance admins.
- Upstream bootstrap.sh runs unchanged in a Job through a docker shim.
- Catppuccin Mocha/Latte stylesheet injected into the stock web image.
- Secrets generated once and kept in Secret/harmony.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:31:50 -05:00

38 lines
1.3 KiB
Django/Jinja

# Harmony's self-host/media-cache.conf (v{{ harmony_version }}) for Kubernetes:
# the resolver is the cluster DNS and Kong is addressed by its full Service name.
# Caches public storage reads (avatars, emoji, post media) between Caddy and Kong.
map $upstream_http_cache_control $media_no_store {
~*(no-store|private) 1;
default 0;
}
proxy_cache_path /var/cache/nginx/media levels=1:2 keys_zone=media:16m max_size=2g inactive=10m use_temp_path=off;
server {
listen 8080;
server_tokens off;
resolver {{ harmony_cluster_dns }} valid=30s ipv6=off;
set $kong supabase-kong.{{ harmony_namespace }}.svc.cluster.local:8000;
location / {
proxy_pass http://$kong;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_cache media;
proxy_cache_key $request_uri;
proxy_ignore_headers Cache-Control Expires;
proxy_cache_valid 200 10m;
proxy_no_cache $media_no_store;
proxy_cache_lock on;
proxy_cache_lock_timeout 5s;
proxy_cache_lock_age 5s;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
add_header X-Cache-Status $upstream_cache_status always;
}
}