Deploy SkyTrace #
Run the container #
docker run -p 8080:80 ghcr.io/alyraffauf/skytrace:latest
Open http://localhost:8080. Pass environment variables with -e to change settings. See the configuration guide for the full list. Change requires recreating the container.
Publish a static build #
bun install --frozen-lockfile
bun run build
Copy the dist/ folder to your static host. If you need custom settings, edit public/runtime-config.js before running bun run build, or edit the deployed runtime-config.js directly.
Hosting setup #
Your host needs three things:
- Route all app paths to
index.htmlso the router can handle them. - Serve fingerprinted assets with long cache headers.
- Return
404for unknown routes, not a catch-all redirect.
Two files in the repo handle this for you:
- public/_redirects — rewrites app routes to
index.html. Use this on Netlify or Cloudflare Pages. - public/_headers — sets
Cache-ControlandX-Robots-Tag: noindexfor profile and list URLs. - nginx.conf — the container's equivalent rules, including a one-year cache for fingerprinted assets.
If your host does not support _redirects or _headers, translate the rules into its config. The key point is that unknown routes must return a 404 with 404.html. A catch-all rewrite to index.html breaks things.
Whenever you add a new app route, update _redirects, nginx.conf, and _headers if the route needs different headers.
Verify the deployment #
Hit these URLs after deploying:
/returns200with nonoindexheader.- A profile tab URL and a list URL return
200withX-Robots-Tag: noindex. - An unknown route, a missing asset, and
/sitemap.xmlreturn404. /runtime-config.jsreturns JavaScript withCache-Control: no-store./robots.txtreturns plain text and allows crawling so thenoindexheaders on profile URLs are read correctly.
If Cloudflare adds a managed crawler policy to robots.txt, leave it alone. Use Search Console's URL Inspection to confirm Google can render the homepage.
Vite's dev server does not apply these rules.