Skip to content
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

chore(with-docker): don't copy package.json twice #39896

Merged
merged 3 commits into from Aug 24, 2022
Merged

Conversation

boredland
Copy link
Contributor

the directory /app/.next/standalone already contains a copy of the package.json so we can skip copying it before we copy the standalone dir

Documentation / Examples

  • Make sure the linting passes by running pnpm lint
  • The examples guidelines are followed from our contributing doc

the directory /app/.next/standalone already contains a copy of the package.json so we can skip copying it before we copy the standalone dir
@ijjk ijjk added the examples Issue/PR related to examples label Aug 24, 2022
boredland and others added 2 commits August 24, 2022 12:36
the whole point of the example is to demonstrate the use of the `output: "standalone"` flag. not copying it would be pointless in my eyes.
Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, looks like there were other copies being done that aren't necessary as well so went ahead and removed those, thanks for the PR!

@ijjk ijjk merged commit 638e6d1 into vercel:canary Aug 24, 2022
@boredland
Copy link
Contributor Author

boredland commented Aug 24, 2022

Good catch, looks like there were other copies being done that aren't necessary as well so went ahead and removed those, thanks for the PR!

are you sure you didn't overdo it now with removing COPY --from=builder /app/next.config.js ./?

if you want to use the standalone build, you still need to add that part to the next.config.js and thus, IMO removing that was a mistake.

@ijjk
Copy link
Member

ijjk commented Aug 24, 2022

The next.config.js is only needed during the builder stage, stadalone mode serializes the config and inlines it into the built server.js file so the next.config.js file isn't needed then.

@boredland
Copy link
Contributor Author

The next.config.js is only needed during the builder stage, stadalone mode serializes the config and inlines it into the built server.js file so the next.config.js file isn't needed then.

Ah, I see. COPY . . in the builder stage does the trick.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants