-
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
Showing
4 changed files
with
866 additions
and
11,991 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,31 +1,33 @@ | ||
FROM node:18.16-alpine AS build-stage | ||
FROM node:18.16 AS build-stage | ||
WORKDIR /usr/src/app/ | ||
COPY package.json yarn.lock ./ | ||
COPY package.json ./ | ||
|
||
RUN yarn install --ignore-scripts | ||
RUN yarn install | ||
|
||
COPY ./src ./src | ||
COPY ./*.json ./ | ||
COPY . . | ||
|
||
RUN yarn build:prod | ||
# COPY ./src ./src | ||
# COPY ./*.json ./ | ||
|
||
FROM node:18.16-alpine AS install-dependencies-stage | ||
WORKDIR /usr/src/app/ | ||
COPY package.json yarn.lock ./ | ||
# RUN yarn build:prod | ||
|
||
RUN yarn install --prod --ignore-scripts | ||
# FROM node:18.16-alpine AS install-dependencies-stage | ||
# WORKDIR /usr/src/app/ | ||
# COPY package.json yarn.lock ./ | ||
|
||
# Run-time stage | ||
FROM node:18.16-alpine AS run-stage | ||
USER node | ||
ARG PORT=3000 | ||
# RUN yarn install --prod --ignore-scripts | ||
|
||
WORKDIR /usr/src/app/ | ||
# # Run-time stage | ||
# FROM node:18.16-alpine AS run-stage | ||
# USER node | ||
# ARG PORT=3000 | ||
|
||
# WORKDIR /usr/src/app/ | ||
|
||
COPY --from=build-stage /usr/src/app/dist ./dist | ||
COPY --from=install-dependencies-stage /usr/src/app/node_modules ./node_modules | ||
COPY . /usr/src/app/ | ||
# COPY --from=build-stage /usr/src/app/dist ./dist | ||
# COPY --from=install-dependencies-stage /usr/src/app/node_modules ./node_modules | ||
# COPY . /usr/src/app/ | ||
|
||
EXPOSE $PORT | ||
# CMD [ "yarn", "start:prod" ] | ||
CMD [ "tail", "-f","/dev/null" ] | ||
EXPOSE 3000 | ||
CMD [ "yarn", "start" ] | ||
# CMD [ "tail", "-f","/dev/null" ] |
Oops, something went wrong.