edit docker file
This commit is contained in:
parent
7827931867
commit
6a9e457f92
1 changed files with 7 additions and 6 deletions
|
|
@ -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;"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue