Skip to content

Add production standalone build instructions in readme #1491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2025

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jul 11, 2025

What

Add instructions to README for how to use the production standalone build.

Why

The readme's production instructions don't align with how next.js standalone builds are intended to be deployed. The instructions say to use yarn start which is convenient, but isn't actually running the standalone production build that yarn build produced. Using yarn start outputs a warning indicating this.

The next.config.js file configures the build to be a standalone build here:

output: "standalone",

A standalone build doesn't need yarn, or the repo. It only needs the static and standalone directories from the build directory.

For more details see https://nextjs.org/docs/pages/api-reference/config/next-config-js/output#automatically-copying-traced-files.

I took a look at this as part of looking into how quickstart was deploying lab (stellar/quickstart#706). It was including the entire repo because it was using yarn start. Next.js' standalone build isn't as well documented as it could be and based on the number of discussion threads online it's not obvious to anyone, including myself as it took me several threads to understand what was going on with it. Including the instructions here in the readme can serve to knowledge share this.

@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Jul 11, 2025
@leighmcculloch leighmcculloch changed the title Add production deployment instructions in readme Add production standalone build instructions in readme Jul 11, 2025
@stellar-jenkins
Copy link

@leighmcculloch leighmcculloch merged commit babbc43 into main Jul 11, 2025
6 checks passed
@leighmcculloch leighmcculloch deleted the deploy-instructions branch July 11, 2025 12:57
@github-project-automation github-project-automation bot moved this from Backlog (Not Ready) to Done in DevX Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants