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 ebc5c89 commit a2d2533Copy full SHA for a2d2533
frontend/Dockerfile
@@ -0,0 +1,33 @@
1
+# Multi-stage build for React app
2
+FROM node:18-alpine AS build
3
+
4
+WORKDIR /app
5
6
+# Install specific npm version
7
+RUN npm install -g npm@9.8.1
8
9
+# Copy package files
10
+COPY package*.json ./
11
12
+# Install all dependencies (including devDependencies for build)
13
+RUN npm ci
14
15
+# Copy source code
16
+COPY . .
17
18
+# Build the app
19
+RUN npm run build
20
21
+# Production stage with nginx
22
+FROM nginx:alpine
23
24
+# Copy built app to nginx
25
+COPY --from=build /app/build /usr/share/nginx/html
26
27
+# Copy custom nginx config
28
+COPY nginx.conf /etc/nginx/conf.d/default.conf
29
30
+# Expose port 80
31
+EXPOSE 80
32
33
+CMD ["nginx", "-g", "daemon off;"]
0 commit comments