Dockerfile
This commit is contained in:
parent
e6168f32fe
commit
5ef5b3e08f
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# Step 1: Build the app
|
||||
FROM node:20-alpine as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm install && npm run build
|
||||
|
||||
# Step 2: Serve it with Nginx
|
||||
FROM nginx:alpine
|
||||
|
||||
# Remove default content
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
# Copy built files from the previous stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Loading…
Reference in New Issue
Block a user