hrms-exam/cms/docker/Dockerfile
Suchin Sapphasitthatha 6e489a0a8d edit dockerfile
2024-12-23 09:51:43 +00:00

17 lines
434 B
Docker

# docker build . -t docker.frappet.com/demo/qualifying-exam-cms:latest
FROM node:20-alpine AS build-stage
WORKDIR /app
# optimize build speed by copy all .xx folder and
COPY cms/*.json .
COPY cms/*.*s .
RUN npm i
COPY cms/static ./static
COPY cms/src ./src
RUN npm run build
FROM node:lts-alpine AS production-stage
WORKDIR /app
COPY --from=build-stage /app .
EXPOSE 80
ENV PORT=80
CMD ["node", "./build/index.js"]