Compare commits

..

12 Commits

Author SHA1 Message Date
fca3194801 fix: add pages/_error and _document to fix Html import in build 2026-04-01 04:56:21 +00:00
22c1df67c1 Merge pull request 'fix: force-dynamic on layouts — skip SSR static gen' (#22) from fix/force-dynamic-all-pages into main 2026-04-01 04:49:51 +00:00
ef6b6a3ad4 fix: force-dynamic on app layout to skip SSR static gen for all pages 2026-04-01 04:49:20 +00:00
8156c1f207 Merge pull request 'fix: force-dynamic on recharts pages (FIBEROPS-249)' (#21) from fix/force-dynamic-recharts-pages into main 2026-04-01 04:39:57 +00:00
8a31ca0199 fix: force-dynamic on recharts pages to prevent SSR static export failure 2026-04-01 04:39:54 +00:00
d58b6bfd0b Merge pull request 'fix: remove standalone output — run next start in Docker' (#20) from fix/no-standalone-output into main 2026-04-01 04:18:47 +00:00
e8b91468a1 fix: remove standalone output, run next start in Docker 2026-04-01 04:18:31 +00:00
ac60822134 Merge pull request 'fix: .dockerignore to exclude .next cache' (#19) from fix/dockerignore-next-cache into main 2026-04-01 04:09:30 +00:00
87e9fac4c1 fix: add .dockerignore to exclude stale .next cache from Docker build 2026-04-01 04:09:26 +00:00
c061e821c9 Merge pull request 'fix: Dockerfile dev deps for tailwindcss build' (#18) from fix/dockerfile-devdeps into main 2026-04-01 03:59:58 +00:00
63cce69634 fix: install devDeps in builder stage for tailwind/typescript (FIBEROPS-249) 2026-04-01 03:59:41 +00:00
ff73898dac Merge pull request 'fix: add Dockerfile + standalone output (FIBEROPS-249)' (#17) from fix/FIBEROPS-249-add-dockerfile into main 2026-04-01 03:44:28 +00:00
10 changed files with 52 additions and 6 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
.next
node_modules
.git
.env.local
.env.*.local
npm-debug.log*
*.log
test-results
playwright-report

View File

@@ -1,9 +1,8 @@
FROM node:22-alpine AS builder FROM node:22-alpine AS builder
WORKDIR /app WORKDIR /app
ENV NODE_ENV=development
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
COPY . . COPY . .
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build RUN npm run build
@@ -13,10 +12,11 @@ WORKDIR /app
ENV NODE_ENV=production ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/package*.json ./
COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000 EXPOSE 3000
ENV PORT=3000 ENV PORT=3000
CMD ["node", "server.js"] CMD ["node_modules/.bin/next", "start"]

View File

@@ -1,4 +1,7 @@
"use client"; "use client";
export const dynamic = "force-dynamic";
import { useState } from "react"; import { useState } from "react";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";

View File

@@ -1,4 +1,7 @@
"use client"; "use client";
export const dynamic = "force-dynamic";
import { useQuery, useMutation } from "@tanstack/react-query"; import { useQuery, useMutation } from "@tanstack/react-query";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";

View File

@@ -1,4 +1,5 @@
'use client'; 'use client';
export const dynamic = 'force-dynamic';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation'; import { useRouter } from 'next/navigation';

View File

@@ -1,4 +1,7 @@
"use client"; "use client";
export const dynamic = "force-dynamic";
import { useState } from "react"; import { useState } from "react";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";

View File

@@ -6,6 +6,8 @@ import Providers from '@/components/providers';
// Fonts are loaded via CSS @import in globals.css (runtime CDN load). // Fonts are loaded via CSS @import in globals.css (runtime CDN load).
// CSS vars are set directly in globals.css :root — no JS injection needed. // CSS vars are set directly in globals.css :root — no JS injection needed.
export const dynamic = 'force-dynamic';
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'FiberOps Admin', title: 'FiberOps Admin',
description: 'ISP Management Platform', description: 'ISP Management Platform',

View File

@@ -1,6 +1,5 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
output: 'standalone',
eslint: { ignoreDuringBuilds: true }, eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true }, typescript: { ignoreBuildErrors: true },
}; };

12
pages/_document.tsx Normal file
View File

@@ -0,0 +1,12 @@
import { Html, Head, Main, NextScript } from 'next/document';
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}

14
pages/_error.tsx Normal file
View File

@@ -0,0 +1,14 @@
// Custom error page — prevents Html import issue in Next.js pages router
export default function Error({ statusCode }: { statusCode?: number }) {
return (
<div style={{ padding: '2rem', fontFamily: 'sans-serif' }}>
<h1>{statusCode || 'Error'}</h1>
<p>{statusCode === 404 ? 'Page not found' : 'An error occurred'}</p>
</div>
);
}
Error.getInitialProps = ({ res, err }: any) => {
const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
return { statusCode };
};