File tree Expand file tree Collapse file tree 9 files changed +47
-43
lines changed
Expand file tree Collapse file tree 9 files changed +47
-43
lines changed Original file line number Diff line number Diff line change 1919 - name : Checkout repository
2020 uses : actions/checkout@v4
2121
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+ with :
25+ driver-opts : |
26+ image=moby/buildkit:latest
27+ network=host
28+
2229 - name : Log in to Azure Container Registry
2330 uses : docker/login-action@v3
2431 with :
Original file line number Diff line number Diff line change 1919 - name : Checkout repository
2020 uses : actions/checkout@v4
2121
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+ with :
25+ driver-opts : |
26+ image=moby/buildkit:latest
27+ network=host
28+
2229 - name : Log in to Azure Container Registry
2330 uses : docker/login-action@v3
2431 with :
Original file line number Diff line number Diff line change 1- # frontend/Dockerfile
21FROM node:20-alpine AS base
3-
4- # Install dependencies only when needed
5- FROM base AS deps
62WORKDIR /app
73
8- # Copy package files
4+ FROM base AS deps
95COPY package.json package-lock.json* ./
10- RUN npm ci
6+ RUN npm ci --omit=dev
117
12- # Rebuild the source code only when needed
138FROM base AS builder
14- WORKDIR /app
159COPY --from=deps /app/node_modules ./node_modules
16- COPY . .
17-
18- # Build the application
10+ COPY tsconfig.json next.config.ts ./
11+ COPY public ./public
12+ COPY src ./src
1913RUN npm run build
2014
21- # Production image, copy all the files and run next
2215FROM base AS runner
2316WORKDIR /app
17+ ENV NODE_ENV=production
2418
25- ENV NODE_ENV production
26-
27- # Create a non-root user and give them ownership
28- RUN addgroup --system --gid 1001 nodejs
29- RUN adduser --system --uid 1001 nextjs
19+ # Create non-root user
20+ RUN addgroup --system --gid 1001 nodejs \
21+ && adduser --system --uid 1001 nextjs
3022USER nextjs
3123
32- # Copy built assets from builder stage
24+ # Copy built assets
3325COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
3426COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
27+ COPY --from=builder --chown=nextjs:nodejs /app/public ./public
3528
3629EXPOSE 3000
30+ ENV PORT=3000
31+ ENV HOSTNAME=0.0.0.0
3732
38- ENV PORT 3000
39- ENV HOSTNAME "0.0.0.0"
40-
41- CMD ["node" , "server.js" ]
33+ CMD ["node" , "server.js" ]
Original file line number Diff line number Diff line change 11FROM node:20-alpine AS base
2+ WORKDIR /app
23
3- # Install dependencies only when needed
44FROM base AS deps
5- WORKDIR /app
65COPY package.json package-lock.json* ./
76RUN npm ci
87
9- # Rebuild the source code only when needed
108FROM base AS builder
11- WORKDIR /app
129COPY --from=deps /app/node_modules ./node_modules
13- COPY . .
10+ COPY tsconfig.json next.config.ts ./
11+ COPY public ./public
12+ COPY src ./src
1413RUN npm run build
1514
16- # Dev/Staging image: Built app with dev logging
1715FROM base AS runner
1816WORKDIR /app
19-
2017ENV NODE_ENV=development
2118
22- # Install runtime deps (including pino-pretty for transport) - but not used now
23- COPY package.json package-lock.json* ./
24- RUN npm ci --only=production && npm install pino-pretty # Keep for potential future use
19+ # Copy runtime deps from deps stage (no double install!)
20+ COPY --from=deps /app/node_modules ./node_modules
21+
22+ # Optionally include dev tool
23+ RUN npm install --global pino-pretty
2524
26- # Copy built assets from builder
25+ # Copy built assets
2726COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
2827COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
28+ COPY --from=builder --chown=nextjs:nodejs /app/public ./public
2929
3030# Create non-root user
31- RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
31+ RUN addgroup --system --gid 1001 nodejs \
32+ && adduser --system --uid 1001 nextjs
3233USER nextjs
3334
3435EXPOSE 3000
35- ENV PORT 3000
36- ENV HOSTNAME " 0.0.0.0"
36+ ENV PORT= 3000
37+ ENV HOSTNAME= 0.0.0.0
3738
38- CMD ["npm", "start"]
39+ CMD ["npm", "start"]
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { notFound } from "next/navigation";
55import { Job } from "@/types/job" ;
66import JobDetailsWrapper from "@/components/jobs/job-details-wrapper" ;
77import { Metadata } from "next" ;
8- import OgImage from "@/assets/OgImage.png" ;
98
109type Props = {
1110 params : Promise < { id : string } > ;
@@ -38,7 +37,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
3837 description,
3938 images : [
4039 {
41- url : OgImage . src ,
40+ url : "/ OgImage.png" ,
4241 alt : title ,
4342 } ,
4443 ] ,
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import { Metadata } from "next";
2121import FeedbackButton from "@/components/ui/feedback-button" ;
2222import { Notifications } from "@mantine/notifications" ;
2323
24- import OgImage from "../assets/OgImage.png" ;
2524import FirstVisitNotification from "@/components/ui/first-visit-notification" ;
2625
2726export const metadata : Metadata = {
@@ -34,7 +33,7 @@ export const metadata: Metadata = {
3433 description : "Stay ahead with the job board that never sleeps." ,
3534 images : [
3635 {
37- url : OgImage . src ,
36+ url : "/ OgImage.png" ,
3837 alt : "MAC Jobs Board" ,
3938 } ,
4039 ] ,
Original file line number Diff line number Diff line change 1- import MacLogo from "@/assets/mac.svg" ;
21import Image from "next/image" ;
32import Link from "next/link" ;
43
54export default function Logo ( ) {
65 return (
76 < Link href = "/" className = "flex space-x-3 items-center h-8 cursor-pointer" >
8- < Image src = { MacLogo } className = "h-10 w-10" alt = "MAC Logo" />
7+ < Image src = "/mac.svg" className = "h-10 w-10" alt = "MAC Logo" />
98 < span className = "text-lg lg:text-xl" > Jobs</ span >
109 </ Link >
1110 ) ;
You can’t perform that action at this time.
0 commit comments