SANDRAMSC commited on
Commit
9383bfc
1 Parent(s): 60ef7be

Adjusted Dockerfile to include backend

Browse files
.github/workflows/ci-cd.yml CHANGED
@@ -25,3 +25,4 @@ jobs:
25
  run: |
26
  docker build -t ${{ secrets.DOCKER_USERNAME }}/docverifyrag:latest .
27
  docker push ${{ secrets.DOCKER_USERNAME }}/docverifyrag:latest
 
 
25
  run: |
26
  docker build -t ${{ secrets.DOCKER_USERNAME }}/docverifyrag:latest .
27
  docker push ${{ secrets.DOCKER_USERNAME }}/docverifyrag:latest
28
+
Dockerfile CHANGED
@@ -1,27 +1,27 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
3
 
4
- # Set environment variables
5
- ENV EXAMPLE 1
6
- ENV EXAMPLE 2
7
 
8
- # Set the working directory in the container
9
- WORKDIR /app
10
 
11
- # Install system dependencies
12
- RUN apt-get update \
13
- && apt-get install -y --no-install-recommends gcc \
14
- && rm -rf /var/lib/apt/lists/*
15
 
16
- # Install application dependencies
17
- COPY requirements.txt /app/
18
- RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy the current directory contents into the container at /app
21
- COPY . /app/
22
 
23
- # Expose the port the app runs on
24
- EXPOSE 5000
 
 
 
 
 
 
25
 
26
- # Run the application
27
- CMD ["python", "app.py"]
 
1
+ # Use node image as a base for building frontend
2
+ FROM node:14 AS frontend
3
 
4
+ # Set the working directory for the frontend in the container
5
+ WORKDIR /app/frontend
 
6
 
7
+ # Copy frontend source code
8
+ COPY frontend /app/frontend
9
 
10
+ # Install frontend dependencies
11
+ RUN npm install
 
 
12
 
13
+ # Build the frontend for production
14
+ RUN npm run build
 
15
 
16
+ # Use nginx image to serve the built frontend
17
+ FROM nginx:alpine AS production
18
 
19
+ # Copy the built frontend from the previous stage to nginx
20
+ COPY --from=frontend /app/frontend/build /usr/share/nginx/html
21
+
22
+ # Expose port 80
23
+ EXPOSE 80
24
+
25
+ # Start nginx server
26
+ CMD ["nginx", "-g", "daemon off;"]
27
 
 
 
frontend/src/components/Features.tsx CHANGED
@@ -58,10 +58,10 @@ export const Features = () => {
58
  </CardHeader>
59
  <CardFooter>
60
  <iframe className="mx-auto"
61
- src="https://docverifyrag.streamlit.app/"
62
  width="80%"
63
  height="400px"
64
- style={{ border: 'none' }} // Optional: Removes iframe border
65
  />
66
  </CardFooter>
67
  </Card>
 
58
  </CardHeader>
59
  <CardFooter>
60
  <iframe className="mx-auto"
61
+ src="https://docverifyrag.streamlit.app"
62
  width="80%"
63
  height="400px"
64
+ style={{ border: 'none' }}
65
  />
66
  </CardFooter>
67
  </Card>
requirements.txt CHANGED
@@ -2,4 +2,9 @@ langchain_community
2
  langchain-text-splitters
3
  langchain-together
4
  unstructured[local-inference]
5
- python-dotenv
 
 
 
 
 
 
2
  langchain-text-splitters
3
  langchain-together
4
  unstructured[local-inference]
5
+ python-dotenv
6
+ streamlit
7
+ langchain
8
+ openai
9
+ chromadb
10
+ tiktoken