diff --git a/Dockerfile.prod b/Dockerfile.prod index 6fb1532..fa8a6c9 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -7,12 +7,12 @@ WORKDIR /app # Copy package.json COPY package.json . -# Install production dependencies using Yarn -RUN npm install --production +# Install dependencies (dev deps needed for the build step) +RUN npm install # Copy the rest of the application files COPY . . -# Build the frontend using Yarn +# Build the frontend RUN npm run build # Stage 2: Serve the application with Nginx diff --git a/src/pages/Login/Login.tsx b/src/pages/Login/Login.tsx index d6f21a7..e77ee3b 100644 --- a/src/pages/Login/Login.tsx +++ b/src/pages/Login/Login.tsx @@ -34,7 +34,7 @@ const Login: React.FC = () => { setMessage(response.data.message); if (response.data.message === 'Login successful') { - navigate("/home"); + navigate("/"); } } catch (error: any) { setMessage(error.response?.data?.message || "Something went wrong");