Spaces:
Sleeping
Sleeping
Adjusted Dockerfile to include backend
Browse files- .github/workflows/ci-cd.yml +1 -0
- Dockerfile +20 -20
- frontend/src/components/Features.tsx +2 -2
- requirements.txt +6 -1
.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
|
2 |
-
FROM
|
3 |
|
4 |
-
# Set
|
5 |
-
|
6 |
-
ENV EXAMPLE 2
|
7 |
|
8 |
-
#
|
9 |
-
|
10 |
|
11 |
-
# Install
|
12 |
-
RUN
|
13 |
-
&& apt-get install -y --no-install-recommends gcc \
|
14 |
-
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
16 |
-
#
|
17 |
-
|
18 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
19 |
|
20 |
-
#
|
21 |
-
|
22 |
|
23 |
-
#
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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' }}
|
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
|