- Added dailyCount parameter to the upsertSchedule function, allowing for the configuration of daily access limits for users. - Updated the smartFactoryLog interface to include daily_count, ensuring proper data handling for schedule management. - Removed the runScheduleNowHandler function from the smartFactoryLogController and adminRoutes, streamlining the API for schedule management. - Modified the frontend SmartFactoryLogPage to support dailyCount selection, improving user experience in managing schedules. These changes aim to enhance the flexibility and usability of the smart factory schedule management system, allowing for better control over user access and scheduling operations.
64 lines
1.8 KiB
JavaScript
64 lines
1.8 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
// Docker 빌드 최적화
|
|
output: "standalone",
|
|
|
|
// ESLint 빌드 시 무시 (프로덕션 빌드 성공을 위해)
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
|
|
// TypeScript 오류도 무시 (필요한 경우)
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
|
|
// 실험적 기능 활성화
|
|
experimental: {
|
|
// 메모리 사용량 최적화 (Next.js 15+)
|
|
webpackMemoryOptimizations: true,
|
|
},
|
|
|
|
// API 프록시 설정 - 백엔드로 요청 전달
|
|
// Docker: SERVER_API_URL 사용. 로컬: 127.0.0.1 사용 (localhost는 IPv6 ::1 로 해석되어 ECONNREFUSED 나는 경우 있음)
|
|
async rewrites() {
|
|
const backendUrl = process.env.SERVER_API_URL || "http://127.0.0.1:8080";
|
|
return [
|
|
{
|
|
source: "/api/:path*",
|
|
destination: `${backendUrl}/api/:path*`,
|
|
},
|
|
];
|
|
},
|
|
|
|
// 캐시 및 CORS 헤더
|
|
async headers() {
|
|
return [
|
|
// HTML 페이지: 배포 후 즉시 반영되도록 캐시 금지
|
|
{
|
|
source: "/((?!_next/static|_next/image|favicon.ico).*)",
|
|
headers: [
|
|
{ key: "Cache-Control", value: "no-cache, no-store, must-revalidate" },
|
|
],
|
|
},
|
|
// API CORS
|
|
{
|
|
source: "/api/:path*",
|
|
headers: [
|
|
{ key: "Access-Control-Allow-Origin", value: "*" },
|
|
{ key: "Access-Control-Allow-Methods", value: "GET,POST,PUT,DELETE,OPTIONS" },
|
|
{ key: "Access-Control-Allow-Headers", value: "Content-Type, Authorization" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
|
|
// 환경 변수 (런타임에 읽기)
|
|
env: {
|
|
// Docker 컨테이너 내부에서는 컨테이너 이름으로 통신
|
|
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080/api",
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|