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

Change the way to run next.js on production environment #1700

Open
dadiorchen opened this issue Aug 1, 2023 · 0 comments
Open

Change the way to run next.js on production environment #1700

dadiorchen opened this issue Aug 1, 2023 · 0 comments
Assignees
Labels
devops enhancement New feature or request good first issue Good for newcomers nextjs

Comments

@dadiorchen
Copy link
Collaborator

Now we use this to run next.js on prod:

FROM node:16-alpine
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --silent
COPY . ./
CMD [ "npm", "run", "build-and-start" ]

The problem with this approach is that it is too resource consuming, we need to change the workflow to: build the next.js on the release stage, then do the deploy, in this way, we don't need to build things on cloud.


Some hints:

  • Please read our readme for more information/guide/tutorial.
  • For design guidelines checkout our Figma design.
  • Here is an engineering book in Greenstand.
  • To know more about our organization, visit our website.
  • If you want to join the slack community (some resources need the community member's permission), please leave your email address.
@dadiorchen dadiorchen added enhancement New feature or request nextjs devops good first issue Good for newcomers labels Aug 1, 2023
@emmanue emmanue self-assigned this Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops enhancement New feature or request good first issue Good for newcomers nextjs
Projects
Status: In Progress
Development

No branches or pull requests

2 participants