Repository navigation
Deploy a built static site with --source (HOS-514) - #4
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
--sourcefolder withindex.htmlat the root and noDockerfileis deployed as a static site. The CLI adds an nginx Dockerfile and config, uploads every file and defaults the port to 80.--staticforces the mode (Jekyll copies a Dockerfile into_site).nginx config: clean URLs (
$uri.htmlfor Next.js export), the site's own404.html, gzip, one-year immutable cache for/_astro/,/_next/static/,/assets/, relative redirects,server_tokens off.deploynow printsURL: https://...and the JSON result hasurl.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.