Skip to content

Deploy a built static site with --source (HOS-514) - #4

Merged
pavel1337 merged 1 commit into
mainfrom
feat/hos-514-static-sites
Oct 28, 2026
Merged

pavel1337 merged 1 commit into
mainfrom
feat/hos-514-static-sites

Conversation

@pavel1337

Copy link
Copy Markdown
Contributor

A --source folder with index.html at the root and no Dockerfile is deployed as a static site. The CLI adds an nginx Dockerfile and config, uploads every file and defaults the port to 80. --static forces the mode (Jekyll copies a Dockerfile into _site).

nginx config: clean URLs ($uri.html for Next.js export), the site's own 404.html, gzip, one-year immutable cache for /_astro/, /_next/static/, /assets/, relative redirects, server_tokens off.

deploy now prints URL: https://... and the JSON result has url.

Tested on prod with Astro, Next.js static export, Docusaurus, Hugo and Jekyll builds: each deploy took 25-30 s; gzip, cache headers, redirects, 404 and the hidden .hostim/ files were checked.

A --source folder with index.html at the root and no Dockerfile is now
deployed as a static site: the CLI adds an nginx Dockerfile and config,
uploads every file (no gitignore or .dockerignore filtering) and defaults
the port to 80. --static forces the mode, for build folders that contain
a Dockerfile (Jekyll copies one into _site).

The nginx config serves clean URLs ($uri.html for Next.js export), the
site's 404.html, gzip, a one-year cache for hashed asset folders and
relative redirects so /blog -> /blog/ stays on https.

deploy now prints the app URL and adds it to the JSON output.
@pavel1337
pavel1337 merged commit a37ffa6 into main Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant