-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
3db86a6
commit b5412fd
Showing
4 changed files
with
32 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Use full image because we need node-gyp to build native dependencies | ||
FROM node:20 AS build | ||
FROM node:20-alpine AS build | ||
|
||
RUN npm install -g [email protected] && npm cache clean --force | ||
RUN npm install -g [email protected] && \ | ||
npm cache clean --force | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json package-lock.* ./ | ||
ADD app/lib ./app/lib | ||
RUN pnpm install | ||
RUN pnpm install --ignore-scripts | ||
RUN pnpm add sharp | ||
|
||
# Build the application | ||
COPY . . | ||
|
@@ -18,4 +20,6 @@ RUN pnpm build | |
# ==================================== | ||
FROM build AS release | ||
|
||
CMD ["npm", "run", "start"] | ||
# avoid using npm scripts that create sub-shells | ||
# calling next binary directly | ||
CMD ["/app/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