From 0fe50611348fb2254b673c9940c681ee9baa99cf Mon Sep 17 00:00:00 2001 From: kevin-asprec Date: Tue, 14 Apr 2026 10:41:42 +0800 Subject: [PATCH] fix: add not-found.tsx, convert to next.config.mjs, add NODE_ENV=development to Dockerfile --- Dockerfile | 4 +++- next.config.mjs | 5 +++++ next.config.ts | 3 --- src/app/not-found.tsx | 10 ++++++++++ 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 next.config.mjs delete mode 100644 next.config.ts create mode 100644 src/app/not-found.tsx diff --git a/Dockerfile b/Dockerfile index a7d7d9b..d2684ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ FROM node:20-alpine AS builder +ARG CACHE_BUST=1 +ENV NODE_ENV=development WORKDIR /app COPY package.json package-lock.json* ./ RUN npm install @@ -11,7 +13,7 @@ RUN apk add --no-cache dumb-init RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static -ENV NODE_ENV=production HOSTNAME=0.0.0.0 PORT=3002 +ENV NODE_ENV=production HOSTNAME=0.0.0.0 EXPOSE 3002 USER nextjs ENTRYPOINT ["dumb-init", "--"] diff --git a/next.config.mjs b/next.config.mjs new file mode 100644 index 0000000..2937c03 --- /dev/null +++ b/next.config.mjs @@ -0,0 +1,5 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + output: 'standalone', +}; +export default nextConfig; diff --git a/next.config.ts b/next.config.ts deleted file mode 100644 index a327e25..0000000 --- a/next.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NextConfig } from 'next'; -const nextConfig: NextConfig = { output: 'standalone' }; -export default nextConfig; diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx new file mode 100644 index 0000000..3cd9eb3 --- /dev/null +++ b/src/app/not-found.tsx @@ -0,0 +1,10 @@ +export default function NotFound() { + return ( + + +

404 - Page Not Found

+

The page you are looking for does not exist.

+ + + ); +}