clipwright/dashboard/nginx.conf
pedro-bento 59e0db8c24 chore: remove dead code, unused assets, and the server-render chain
Backend:
- Drop unused imports/locals and zero-reference helpers (truncate_ip,
  in_split, GEMINI_PROMPT_TEMPLATE, legacy subtitles SRT path, dead paths)
- Remove unwired features (delete_uploaded, mark_ai_generated, unmark_job,
  compact_words, restoring_static restorer hook, gemini_worker __main__)
- Remove shelved panel_layout module + its flags/tests
- Remove the /api/render proxy + RENDER_SERVICE_URL

Frontend:
- Delete App.css, react.svg, vite.svg, agent screenshot, demo mp4s
- Remove dead exports (downloadBlobUrl, consent reopen machinery, dead zod
  schemas/CITED_STATS) and unused deps (@remotion/media-utils, zod)
- Drop the /render dev proxy; rewrite dashboard README

Repo/config:
- Delete render-service/ and top-level remotion/ (superseded by the
  dashboard's in-browser Remotion copy); drop the compose renderer service
- Delete docker-compose.e2e.local.yml and 4 unreferenced screenshots
- Prune .env.example dead keys, add GEMINI_API_KEY/MAX_CONCURRENT_JOBS
- Tighten .dockerignore/.gitignore; add dashboard lint to CI
- Fix stale compliance doc + README structure

Backend 709 passed / 18 skipped; dashboard lint+build green; compose valid.
2026-10-04 21:24:42 +01:00

64 lines
2.6 KiB
Nginx Configuration File

# Apex to www, permanently.
#
# Traefik was doing this with `redirectregex.permanent=false`, which answers 307.
# A temporary redirect does not consolidate ranking signals, so every canonical
# on the site named a URL that only ever redirects. Coolify regenerates its
# Traefik labels on every deploy and hardcodes permanent=false, so pinning it
# there would be overwritten; the redirect lives here instead, in version
# control. This requires the app's `redirect` setting in Coolify to be `both`,
# so Traefik routes the apex through to this container rather than redirecting
# it first.
server {
listen 80;
server_name git.pbento.pt;
return 301 https://git.pbento.pt/pedro-bento/clipwright$request_uri;
}
server {
# Explicitly the default server: the block above claims a specific
# server_name, and without this marker nginx would fall back to whichever
# block is declared first.
listen 80 default_server;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Cache hashed assets aggressively; never cache index.html.
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# index.html must NOT be cached — it points at the hashed asset bundle, so a
# stale cached copy keeps loading the previous deploy's JS. (nginx add_header
# doesn't inherit into a location that sets its own, so the security headers
# are repeated here.)
#
# $uri.html comes before $uri/ so the build-time SEO pages
# (/alternatives/opus-clip and friends) are served at their clean path with a
# 200. Resolving them as directories instead would make nginx 301 to a
# trailing-slash URL, so every canonical would point at a redirect.
#
# Unknown paths get a real 404, not the SPA shell. The app routes entirely
# through the hash, which never reaches the server, so there is no deep link
# that needs the fallback — and answering 200 with identical markup for
# every made-up path made the whole site look like one page duplicated
# infinitely to a crawler.
location / {
try_files $uri $uri.html $uri/ =404;
add_header Cache-Control "no-store, must-revalidate" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
}
error_page 404 /404.html;
location = /404.html {
internal;
add_header Cache-Control "no-store, must-revalidate" always;
}
# Basic security headers.
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
}