From 2c0d3f5855b626af0eae5674ce397308ff31a159 Mon Sep 17 00:00:00 2001 From: ishitaajain-coder Date: Thu, 2 Oct 2025 10:57:41 +0530 Subject: [PATCH 1/4] Update docker-compose.yml --- docker-compose.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3b09ec5c..6a9e77b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ version: "3.9" - services: recodehive: build: @@ -8,8 +7,8 @@ services: - "3000:3000" volumes: - .:/app - - /app/node_modules + - /app/node_modules # Prevents node_modules being overwritten by the mount working_dir: /app - command: npm run start + command: npm run dev # THIS is the crucial change for hot-reload! environment: - NODE_ENV=development From 07c0dcd8429c18789fbcef5fffbf85ee04a90bf1 Mon Sep 17 00:00:00 2001 From: ishitaajain-coder Date: Thu, 2 Oct 2025 10:58:27 +0530 Subject: [PATCH 2/4] Update Dockerfile --- Dockerfile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 915af286..fdb99554 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,14 @@ -FROM node:18-alpine AS builder +FROM node:20-alpine -# Set working directory inside the container WORKDIR /app COPY package*.json ./ -# Install dependencies with legacy peer deps fix RUN npm install --legacy-peer-deps COPY . . -RUN npm run build -# Production Image -FROM node:18-alpine -WORKDIR /app -COPY --from=builder /app /app +# No need to run 'npm run build' for development-mode Docker EXPOSE 3000 -CMD ["npm", "run","serve"] \ No newline at end of file +CMD [ "npm", "run", "dev" ] From 4a3ff89f189fe2a969f3fee4182a94d685be3a6c Mon Sep 17 00:00:00 2001 From: ishitaajain-coder Date: Thu, 2 Oct 2025 10:58:51 +0530 Subject: [PATCH 3/4] Update package.json --- package.json | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b42bb8b0..d79e8d6f 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "docusaurus": "docusaurus", + "dev": "docusaurus start", "start": "docusaurus start", "build": "docusaurus build", "swizzle": "docusaurus swizzle", @@ -15,14 +16,14 @@ "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "^3.8.1", - "@docusaurus/plugin-content-docs": "3.8.1", - "@docusaurus/plugin-google-analytics": "^3.8.1", - "@docusaurus/plugin-ideal-image": "3.8.1", - "@docusaurus/preset-classic": "^3.8.1", - "@docusaurus/theme-classic": "^3.8.1", - "@docusaurus/theme-mermaid": "3.8.1", - "@docusaurus/theme-search-algolia": "3.8.1", + "@docusaurus/core": "^3.9.1", + "@docusaurus/plugin-content-docs": "3.9.1", + "@docusaurus/plugin-google-analytics": "^3.9.1", + "@docusaurus/plugin-ideal-image": "3.9.1", + "@docusaurus/preset-classic": "^3.9.1", + "@docusaurus/theme-classic": "^3.9.1", + "@docusaurus/theme-mermaid": "3.9.1", + "@docusaurus/theme-search-algolia": "3.9.1", "@floating-ui/react": "^0.27.8", "@giscus/react": "^3.1.0", "@mdx-js/react": "^3.0.0", From dc35fe96be03f18a411d2c82ed2325e32f606ffc Mon Sep 17 00:00:00 2001 From: ishitaajain-coder Date: Thu, 2 Oct 2025 11:16:27 +0530 Subject: [PATCH 4/4] Update README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 33632d9e..6f0bd607 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,25 @@ docker run -p 3000:3000 recodehive-app This command will start a development server and open the application in your default web browser. +## ⚡ Local Development with Docker Compose & Hot Reload + +For an even smoother experience, contributors can leverage **Docker Compose with hot reloading**. +This lets you see code changes instantly at [http://localhost:3000](http://localhost:3000) without rebuilding or restarting containers. + +### 🏃 Quick Start + +```bash +git clone https://github.com/your-username/recodehive-website.git +cd recodehive-website +docker-compose up +``` + +### 🚢 Production Deployment +```bash +npm run build +npm run serve +``` + **If you'd like to contribute to CodeHarborHub, please follow these guidelines:** - **Fork** the repository and clone it locally.