pranav8tripathi@gmail.com commited on
Commit
7202744
·
1 Parent(s): cecf11e
Files changed (2) hide show
  1. Dockerfile +11 -14
  2. src/components/ResearchSection.tsx +1 -1
Dockerfile CHANGED
@@ -1,21 +1,18 @@
1
- # Use Node.js LTS
2
- FROM node:20-alpine
3
-
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy package files
8
  COPY package*.json ./
9
- COPY package-lock.json* ./
10
-
11
- # Install dependencies
12
- RUN npm install
13
-
14
- # Copy the rest of the application
15
  COPY . .
16
 
17
- # Expose the port the app runs on
 
 
 
 
 
18
  EXPOSE 7860
19
 
20
- # Command to run the application in development mode
21
- CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Stage 1: Build
2
+ FROM node:20-alpine AS build
 
 
3
  WORKDIR /app
4
 
 
5
  COPY package*.json ./
6
+ RUN npm ci
 
 
 
 
 
7
  COPY . .
8
 
9
+ # Build the production-ready static files
10
+ RUN npm run build
11
+
12
+ # Stage 2: Serve
13
+ FROM nginx:alpine
14
+ COPY --from=build /app/dist /usr/share/nginx/html
15
  EXPOSE 7860
16
 
17
+ # Hugging Face expects your app on port 7860
18
+ CMD ["nginx", "-g", "daemon off;"]
src/components/ResearchSection.tsx CHANGED
@@ -69,7 +69,7 @@ const researchPapers: ResearchPaper[] = [
69
  authors: "Dr. Carlos Mendez, Dr. Jennifer Wong",
70
  date: "2023-03-22",
71
  category: "Fruits",
72
- abstract: "Analysis of advanced humidity control technologies and their effectiveness in preserving tropical fruits during long-distance transportation and storage.",
73
  downloadUrl: "#",
74
  },
75
  ];
 
69
  authors: "Dr. Carlos Mendez, Dr. Jennifer Wong",
70
  date: "2023-03-22",
71
  category: "Fruits",
72
+ abstract: "Analysis of advanced humidity control technologies and their effectiveness in preserving tropical fruits during long-distance transportation and storage.",
73
  downloadUrl: "#",
74
  },
75
  ];