We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent febc208 commit 5dfb9bbCopy full SHA for 5dfb9bb
Dockerfile
@@ -0,0 +1,31 @@
1
+# Stage 1: Build the app
2
+FROM node:23-alpine AS build
3
+
4
+# Install pnpm
5
+RUN corepack enable
6
7
+WORKDIR /app
8
9
+# Copy only package.json and pnpm-lock.yaml to leverage caching
10
+COPY package.json pnpm-lock.yaml* ./
11
12
+# Install dependencies using pnpm
13
+RUN pnpm install
14
15
+# Copy the rest of the application code
16
+COPY . .
17
18
+# Build the application
19
+RUN pnpm build
20
21
+# Stage 2: Serve the app with a minimal web server
22
+FROM nginx:alpine
23
24
+# Copy built files from the previous stage to the Nginx web server's public directory
25
+COPY --from=build /app/dist /usr/share/nginx/html
26
27
+# Expose port 80
28
+EXPOSE 80
29
30
+# Start Nginx
31
+CMD ["nginx", "-g", "daemon off;"]
0 commit comments