hrms-publish/docker/Dockerfile

18 lines
522 B
Text
Raw Normal View History

2023-12-20 10:04:43 +07:00
# docker build . -t docker.frappet.com/demo/fe:latest
2024-12-03 10:42:58 +07:00
# Build Stage
2024-12-06 11:21:37 +07:00
FROM node:20-alpine as build-stage
2023-12-20 10:04:43 +07:00
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build
2024-12-03 10:42:58 +07:00
# Production Stage
FROM nginx:stable-alpine AS production-stage
2023-12-20 10:04:43 +07:00
RUN mkdir /app
COPY --from=build-stage /app/dist /app
2024-12-03 10:42:58 +07:00
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
2023-12-20 10:04:43 +07:00
RUN chmod u+x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
2024-12-03 10:42:58 +07:00
CMD ["nginx", "-g", "daemon off;"]