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

Remove unused "start" script from with-docker/package.json #31053

Merged
merged 2 commits into from Feb 5, 2022

Conversation

@ijjk ijjk added the examples Issue/PR related to examples label Nov 5, 2021
Comment on lines -25 to -26
The `start` script in `package.json` has been modified to accept a `PORT` environment variable (for compatibility with Google Cloud Run).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe it is not necessary to change the usage of next start since it will pick up $PORT value anyway (the -p flag is redundant if $PORT variable is present)

Copy link
Member

Choose a reason for hiding this comment

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

This is explicitly needed for deployment to Google Cloud. Maybe we can add a comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I understand correctly - which part is needed for GC, the start script in package.json, or the -p parameter on next CLI, or both?

We don't pass the -p parameter in Dockerfile CMD since 5abfea3.

Happy to close this PR if not needed!

@@ -2,8 +2,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start -p ${PORT:=3000}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed unused script for clarity - the Dockerfile contains the entrypoint in this example

stefee referenced this pull request Nov 5, 2021
Fixes #29023 

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes
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.

This looks good as we are now using the standalone server from outputStandalone, thanks for the PR!

@ijjk ijjk requested a review from steven-tey as a code owner February 5, 2022 21:43
@ijjk ijjk merged commit 84b7d9a into vercel:canary Feb 5, 2022
@stefee stefee deleted the docker-remove-npm-start branch February 6, 2022 08:50
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 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

3 participants