Skip to content

Static sites

Files built once and served from the edge: landings, docs and single-page apps.

Applies to EngineCloud
View as Markdown
On this page
  1. What Run detects
  2. Behaviour
  3. What it costs

A static site is a folder of files: HTML, CSS, JavaScript, images. Run uploads it under the deploy’s own prefix in Amazon S3 and serves it through Amazon CloudFront, so every visitor gets it from a location near them.

What Run detects

Your projectBuild commandOutput folder
Vite (React, Vue, Svelte)vite builddist
Astro without an adapterastro builddist
Next.js with output: 'export'next buildout
Plain HTMLnonethe folder you deploy

Set build.command and build.output in the app’s table of sypnia.toml when your project is different.

Behaviour

  • Single-page apps. With spa = true, any path without a file answers index.html, so client-side routing works on refresh.
  • Clean URLs. /about serves about.html or about/index.html.
  • Caching. Files whose names carry a hash (app.3f9c.js) are cached for a year; HTML is revalidated on every request. A release changes which deploy answers, so visitors never mix files of two deploys.
  • Headers and redirects. Declared in the app’s table of sypnia.toml under headers and redirects, applied at the edge.
  • 404. 404.html in the output is the not-found page.

What it costs

Static sites use storage for each deploy’s files and the bytes sent to visitors. Credits and limits lists what is metered.

  1. What Run detects
  2. Behaviour
  3. What it costs

    Search pages, sections and terms