We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c3db05 commit 8e90a62Copy full SHA for 8e90a62
2 files changed
.dockerignore
@@ -0,0 +1 @@
1
+nore_modules
Dockerfile
@@ -0,0 +1,29 @@
+# Use the official Node.js image as a build stage
2
+FROM node:20 AS build
3
+
4
+# Set the working directory
5
+WORKDIR /app
6
7
+# Copy package.json and package-lock.json (if available)
8
+COPY package*.json ./
9
10
+# Install dependencies
11
+RUN npm install
12
13
+# Copy the rest of the application files
14
+COPY . .
15
16
+# Build the Vite app for production
17
+RUN npm run build
18
19
+# Use nginx to serve the app
20
+FROM nginx:alpine
21
22
+# Copy the build output to nginx's html directory
23
+COPY --from=build /app/dist /usr/share/nginx/html
24
25
+# Expose port 80
26
+EXPOSE 80
27
28
+# Start nginx
29
+CMD ["nginx", "-g", "daemon off;"]
0 commit comments