add dockerfile

This commit is contained in:
2024-07-12 23:27:57 +02:00
parent acfa09e9b7
commit 266e9c745b
2 changed files with 20 additions and 0 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM node:lts-alpine AS builder
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package*.json ./
RUN npm install
# Bundle app source
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /usr/src/app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]