-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into examples/with-chakra-ui-typescript
- Loading branch information
Showing
14 changed files
with
58 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
FROM mhart/alpine-node | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN yarn install | ||
RUN yarn install --frozen-lockfile | ||
|
||
RUN yarn build | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["yarn", "start"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
# Do the npm install or yarn install in the full image | ||
# Stage 1: Building the code | ||
FROM mhart/alpine-node AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json yarn.lock ./ | ||
|
||
RUN yarn install --frozen-lockfile | ||
|
||
COPY . . | ||
RUN yarn --production | ||
|
||
RUN yarn build | ||
RUN yarn install --production --frozen-lockfile | ||
|
||
|
||
# Stage 2: And then copy over node_modules, etc from that stage to the smaller base image | ||
FROM mhart/alpine-node:base as production | ||
|
||
# And then copy over node_modules, etc from that stage to the smaller base image | ||
FROM mhart/alpine-node:base | ||
WORKDIR /app | ||
COPY --from=builder /app/node_modules ./node_modules | ||
COPY --from=builder /app/.next ./.next | ||
|
||
# COPY package.json next.config.js .env* ./ | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/.next ./.next | ||
COPY --from=builder /app/node_modules ./node_modules | ||
|
||
EXPOSE 3000 | ||
CMD ["node_modules/.bin/next", "start"] | ||
|
||
CMD ["node_modules/.bin/next", "start"] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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