diff --git a/docker/Dockerfile b/docker/Dockerfile index 21c068a..eff8883 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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;"] \ No newline at end of file