working doker
This commit is contained in:
parent
95759dd14e
commit
72343712c4
1 changed files with 13 additions and 6 deletions
|
@ -1,19 +1,26 @@
|
|||
FROM node:alpine AS build
|
||||
FROM node:alpine as build
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM node:alpine
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/build ./build
|
||||
COPY --from=build /app/package*.json ./
|
||||
|
||||
RUN npm install --only=production
|
||||
COPY --from=build /app/build ./build
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
RUN npm ci --omit dev
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "build/server/index.js"]
|
||||
CMD ["node", "build"]
|
Loading…
Add table
Reference in a new issue