edit docker file

This commit is contained in:
DESKTOP-2S5P7D1\Windows 10 2024-12-07 08:53:34 +07:00
parent 7827931867
commit 6a9e457f92

View file

@ -1,4 +1,6 @@
# docker build . -t docker.frappet.com/demo/fe:latest
# docker buildx build --platform=linux/amd64 -f docker/Dockerfile . -t hrms-git.chin.in.th/bma-hrms/hrms-mgt:0.1
# Build Stage
FROM node:20-alpine as build-stage
WORKDIR /app
COPY package*.json ./
@ -6,13 +8,12 @@ RUN npm install
COPY ./ .
RUN npm run build
FROM nginx as production-stage
# Production Stage
FROM nginx:stable-alpine AS production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod u+x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]