-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
4,814 additions
and
7,057 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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM node:20-alpine as BUILD_IMAGE | ||
WORKDIR /app | ||
COPY package.json package-lock.json ./ | ||
# install dependencies | ||
RUN npm ci --audit=false | ||
RUN npm rebuild --arch=x64 --platform=linux --libc=musl sharp | ||
|
||
COPY . . | ||
|
||
# build | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
ENV NODE_ENV production | ||
ENV NEXT_SHARP_PATH=/app/.next/standalone/node_modules/sharp | ||
|
||
RUN npm run build | ||
|
||
FROM node:20-alpine | ||
WORKDIR /app | ||
|
||
RUN apk update && apk add --no-cache dumb-init | ||
|
||
RUN addgroup -S app && adduser -S app -G app | ||
|
||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
ENV NODE_ENV production | ||
|
||
# copy from build image | ||
|
||
COPY --from=BUILD_IMAGE /app/.next/standalone ./standalone | ||
COPY --from=BUILD_IMAGE /app/.next/static ./standalone/.next/static | ||
COPY --from=BUILD_IMAGE /app/public ./standalone/public | ||
|
||
EXPOSE 3000 | ||
|
||
RUN chown -R app:app /app | ||
USER app | ||
|
||
ENV NEXT_SHARP_PATH=/app/standalone/node_modules/sharp | ||
ENV NODE_ENV production | ||
|
||
|
||
CMD ["dumb-init", "node", "./standalone/server.js"] |
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
Oops, something went wrong.