DockHostingDocs
Stacks

Static sites, React and Vue

Deploy plain HTML, or a React, Vue or Vite app built into static files.

What we detect

  • Plain HTML: an index.html at the root (or another home page we find).
  • React or Vue: react or vue in package.json, with no server framework. We run your build script and serve the output folder (dist or build).

Static sites are served by nginx on port 80. There's no port to set and nothing to start.

Single-page apps

For React Router, Vue Router and other client-side routers, every path serves index.html, so reloading /dashboard works instead of showing a 404.

Build settings

We serve the folder your build writes to: dist or build, as Vite and Create React App do by default. Change the build itself with Build command in the project's Settings.

package.json
{
  "scripts": {
    "build": "vite build"
  }
}

Environment variables in a static site

A static site has no server: variables like VITE_API_URL are baked into the files at build time. Set them before deploying, and redeploy after changing them. Never put secrets in them: anyone can read them in the browser.

On this page