Add Dockerfile
This commit is contained in:
parent
56e8672e24
commit
d07d6a6ccc
21
cope2n-fe/Dockerfile
Normal file
21
cope2n-fe/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM node:21-alpine AS build
|
||||
|
||||
WORKDIR /app/
|
||||
COPY --chown=node:node package*.json ./
|
||||
RUN npm install
|
||||
COPY --chown=node:node . .
|
||||
RUN npm run build
|
||||
RUN npm cache clean --force
|
||||
USER node
|
||||
|
||||
###################
|
||||
# PRODUCTION
|
||||
###################
|
||||
FROM nginx:stable-alpine AS nginx
|
||||
|
||||
COPY --from=build /app/dist/ /usr/share/nginx/html/
|
||||
COPY --from=build /app/run.sh /app/
|
||||
COPY --from=build /app/nginx.conf /configs/
|
||||
RUN chmod +x /app/run.sh
|
||||
|
||||
CMD ["/app/run.sh"]
|
Loading…
Reference in New Issue
Block a user