24 lines
386 B
Text
24 lines
386 B
Text
|
FROM node:18-alpine AS build
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY package*.json ./
|
||
|
|
||
|
RUN npm install
|
||
|
|
||
|
COPY . /app
|
||
|
|
||
|
RUN npm run build
|
||
|
|
||
|
FROM node:18-alpine AS prod
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY --from=build /app/dist /app/dist
|
||
|
COPY --from=build /app/node_modules /app/node_modules
|
||
|
COPY --from=build /app/package.json /app/package.json
|
||
|
COPY --from=build /app/.env /app/.env
|
||
|
|
||
|
EXPOSE 5000
|
||
|
|
||
|
CMD [ "npm", "run", "start" ]
|