From 153ea40b5ac58c23b95cb59eccdbf783604601e1 Mon Sep 17 00:00:00 2001 From: Maana Ajmera Date: Sat, 15 Jun 2024 02:57:32 +0530 Subject: [PATCH 1/2] fixed input of chatbox --- frontend/src/ChatAssistant/ChatAssistant.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ChatAssistant/ChatAssistant.css b/frontend/src/ChatAssistant/ChatAssistant.css index f47297fe..7511d12b 100644 --- a/frontend/src/ChatAssistant/ChatAssistant.css +++ b/frontend/src/ChatAssistant/ChatAssistant.css @@ -42,7 +42,7 @@ .react-chatbot-kit-chat-container { width: 350px; - height: 450px; + height: 415px; } .react-chatbot-kit-chat-bot-message { From 44d113d2aa16d6a383506ca96e7feb8f1acd95dc Mon Sep 17 00:00:00 2001 From: AMS <111883236+AMS003010@users.noreply.github.com> Date: Sat, 15 Jun 2024 09:29:43 +0530 Subject: [PATCH 2/2] added containerization files --- backend/.dockerignore | 6 ++ backend/Dockerfile | 12 ++++ compose.yaml | 18 ++++++ frontend/.dockerignore | 6 ++ frontend/Dockerfile | 13 +++++ frontend/src/App.js | 68 ++--------------------- frontend/src/ChatAssistant/Avatar.jsx | 6 +- frontend/src/ChatAssistant/UserAvatar.jsx | 6 +- frontend/src/Component/About.js | 1 + frontend/src/Component/Footer.js | 5 +- frontend/src/index.js | 5 +- 11 files changed, 72 insertions(+), 74 deletions(-) create mode 100644 backend/.dockerignore create mode 100644 backend/Dockerfile create mode 100644 compose.yaml create mode 100644 frontend/.dockerignore create mode 100644 frontend/Dockerfile diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 00000000..3b0d3218 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,6 @@ +node_modules +build +.DS_Store +.env +.git +.gitignore \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 00000000..463e907b --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,12 @@ +FROM node:alpine AS builder +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm install +COPY . . + +FROM node:alpine +WORKDIR /app +COPY --from=builder /app /app +RUN npm install +EXPOSE 8000 +CMD ["npm","start"] \ No newline at end of file diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..8c1320b8 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,18 @@ +version: '3.8' + +services: + devlab-frontend: + build: + context: ./frontend + ports: + - "3000:3000" + env_file: + - ./frontend/.env + + devlab-backend: + build: + context: ./backend + ports: + - "8000:8000" + env_file: + - ./backend/.env \ No newline at end of file diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 00000000..3b0d3218 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,6 @@ +node_modules +build +.DS_Store +.env +.git +.gitignore \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 00000000..fed244b4 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,13 @@ +FROM node:alpine AS builder +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm install +COPY . . +RUN npm run build + +FROM node:alpine +WORKDIR /app +COPY --from=builder /app /app +RUN npm install +EXPOSE 3000 +CMD ["npm","start"] \ No newline at end of file diff --git a/frontend/src/App.js b/frontend/src/App.js index cda49431..0cd97e29 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,6 +1,6 @@ // App.js -import React, { useState, useEffect } from "react"; -import { Route, Routes, BrowserRouter } from "react-router-dom"; +import React, { useState } from "react"; +import { Route, Routes } from "react-router-dom"; // Components import "./App.css"; @@ -19,18 +19,8 @@ import Review from "./Component/Review"; import AOS from "aos"; import "aos/dist/aos.css"; - - -import Review from "./Component/Review.js"; - - -import Review from "./Component/Review"; - -import AOS from "aos"; -import "aos/dist/aos.css"; import { Toaster } from "react-hot-toast"; - import ScrollToTop from "./Component/ScrollToTop"; import Faq from "./Component/Faq"; @@ -42,58 +32,13 @@ import Extension from "./pages/Extension"; import UI from "./pages/UI"; import FrontendTools from "./pages/FrontendTools"; import EthicalHacking from "./pages/EthicalHacking"; -import CodingPlateform from "./pages/CodingPlatform.jsx"; -import CourcesPlatform from "./pages/CoursesPlatform.jsx"; - - -import Faq from "./Component/Faq"; - -function App() { - const [searchQuery, setSearchQuery] = useState(""); - AOS.init(); - - return ( - <> - - - - }> - }> - }> - }> - } /> - } /> {/* 404 route */} - }> - - }> - }> - }> - }> - }> - }> - }> - }> - }> - - - -