chore: docker + nav fix
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
parent
ccbd82f730
commit
f0fd47dccd
2 changed files with 82 additions and 27 deletions
37
frontend/Dockerfile
Normal file
37
frontend/Dockerfile
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
|
||||||
|
FROM node:24.1.0-bookworm AS build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy package files and install dependencies
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
# Copy app source code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Build the Next.js app
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Runtime stage
|
||||||
|
FROM node:24.1.0-bookworm AS runtime
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy package files and install only production dependencies
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci --only=production
|
||||||
|
|
||||||
|
# Copy built app and public assets from build stage
|
||||||
|
COPY --from=build /app/.next ./.next
|
||||||
|
COPY --from=build /app/public ./public
|
||||||
|
|
||||||
|
# Expose port 3000
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
# Use unprivileged user for security
|
||||||
|
USER node
|
||||||
|
|
||||||
|
# Start the Next.js app
|
||||||
|
CMD ["npm", "start"]
|
||||||
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { ModeToggle } from "@/components/ModeToggle";
|
import { ModeToggle } from "@/components/ModeToggle";
|
||||||
|
|
@ -8,35 +10,48 @@ import {
|
||||||
MessageCircleMore,
|
MessageCircleMore,
|
||||||
Handshake,
|
Handshake,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
export function NavigationMenu() {
|
export function NavigationMenu() {
|
||||||
|
const pathname = usePathname();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-center fixed left-1/2 -translate-x-1/2 -translate-y-1/2 bottom-5 md:top-10 md:bottom-auto z-20 backdrop-blur-sm bg-white/20 outline-none rounded-lg border-1">
|
<div className="flex justify-center">
|
||||||
<Link href="/">
|
<div className="flex justify-center fixed left-1/2 -translate-x-1/2 -translate-y-1/2 bottom-5 md:top-10 md:bottom-auto z-20 backdrop-blur-sm bg-white/20 outline-none rounded-lg border-1">
|
||||||
<Button variant="ghost">
|
<Link href="/">
|
||||||
<div className="hidden md:inline">Home</div>
|
<Button
|
||||||
<div className="md:hidden">
|
variant="ghost"
|
||||||
<House />
|
className={`${pathname === "/" ? "text-red-500" : ""} text-xl`}
|
||||||
</div>
|
>
|
||||||
</Button>
|
<div className="hidden md:inline">Home</div>
|
||||||
</Link>
|
<div className="md:hidden">
|
||||||
<Link href="/blog">
|
<House style={{ width: "27px", height: "27px" }} />
|
||||||
<Button variant="ghost">
|
</div>
|
||||||
<div className="hidden md:inline">Blog</div>
|
</Button>
|
||||||
<div className="md:hidden">
|
</Link>
|
||||||
<NotebookPen />
|
<Link href="/blog">
|
||||||
</div>
|
<Button
|
||||||
</Button>
|
variant="ghost"
|
||||||
</Link>
|
className={`${pathname === "/blog" ? "text-red-500" : ""} text-xl`}
|
||||||
<Link href="/portfolio">
|
>
|
||||||
<Button variant="ghost">
|
<div className="hidden md:inline">Blog</div>
|
||||||
<div className="hidden md:inline">Portfolio</div>
|
<div className="md:hidden">
|
||||||
<div className="md:hidden">
|
<NotebookPen style={{ width: "27px", height: "27px" }} />
|
||||||
<BriefcaseBusiness />
|
</div>
|
||||||
</div>
|
</Button>
|
||||||
</Button>
|
</Link>
|
||||||
</Link>
|
<Link href="/portfolio">
|
||||||
{/*
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
className={`${pathname === "/portfolio" ? "text-red-500" : ""} text-xl`}
|
||||||
|
>
|
||||||
|
<div className="hidden md:inline">Portfolio</div>
|
||||||
|
<div className="md:hidden">
|
||||||
|
<BriefcaseBusiness style={{ width: "27px", height: "27px" }} />
|
||||||
|
</div>
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
{/*
|
||||||
<Link href="/talk">
|
<Link href="/talk">
|
||||||
<Button variant="ghost">
|
<Button variant="ghost">
|
||||||
<div className="hidden md:inline">Talk</div>
|
<div className="hidden md:inline">Talk</div>
|
||||||
|
|
@ -54,7 +69,10 @@ export function NavigationMenu() {
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
*/}
|
*/}
|
||||||
<ModeToggle />
|
</div>
|
||||||
|
<div className="fixed md:right-1/3 right-2 -translate-x-1/2 -translate-y-1/2 bottom-5 md:top-10 md:bottom-auto z-20 backdrop-blur-sm bg-white/20 outline-none rounded-lg border-1">
|
||||||
|
<ModeToggle />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue