-
Notifications
You must be signed in to change notification settings - Fork 0
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
soyeonkim0227
committed
May 10, 2024
1 parent
21041ff
commit 25cf6a0
Showing
2 changed files
with
32 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
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,30 @@ | ||
# dependency install | ||
FROM node:18 AS install | ||
WORKDIR /app | ||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
ARG NODE_ENV production | ||
ENV NODE_ENV NODE_ENV | ||
|
||
RUN npm run build | ||
|
||
CMD ["node", "dist/main.js"] | ||
|
||
|
||
|
||
# # image create | ||
# FROM node:18-alpine AS build | ||
# WORKDIR /app | ||
|
||
# COPY --chown=node:node --from=install /app/node_modules ./node_modules | ||
# COPY --chown=node:node . . | ||
|
||
# RUN npm run build | ||
|
||
# ENV NODE_ENV production | ||
|
||
# RUN npm ci --only=production && npm cache clean |