FerryDocs

Static sites

For a static site, Ferry makes an nginx image that serves your files on port 80.

Edit on GitHub
Your filesBuild stepnpm run buildnginx:alpineport 80

With no build step, nginx serves your files as they are.

1 / 3

A is the static service type, or the static runtime. serves it.

Deploy a folder of files

A folder of plain files with an index.html needs no build.

Terminal
ferry up my-site --type static --dir ./public

How nginx serves the files

  • For /about, nginx looks for about, then about/index.html, then about.html.
  • A page that does not exist gets a 404 status, with your 404.html if there is one.
  • nginx compresses the answers with gzip.
  • nginx never serves dotfiles (.env, .git…), but it serves the files below /.well-known/.

For the two options, see The build of a static site and Publish directory.

On this page