- @prisma/client·prisma 6.19.3 → 7.10.1, @prisma/adapter-better-sqlite3 사용 - 생성 클라이언트를 src/generated/prisma 로 출력하고 저장소에 포함 (build 에서 prisma generate 제거) - datasource URL 은 prisma.config.ts 에서 읽음 - db-url.ts: 상대 file: 경로를 Prisma CLI 와 같이 prisma/ 기준으로 해석 - DateTime 호환을 위해 timestampFormat: unixepoch-ms 지정 - Prisma 7 WASM 쿼리 컴파일러가 필요하므로 standalone 추적 제외 목록에서 wasm 제거 - README: 운영 서버에서 관리자 비밀번호 변경 절차 보강 현재 운영 서버(/srv/yonggong/build)에 배포된 소스와 동일합니다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
1.8 KiB
TypeScript
56 lines
1.8 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
poweredByHeader: false,
|
|
compress: true,
|
|
// 업로드 경로를 런타임에 결정하다 보니 Turbopack이 프로젝트 전체를 추적합니다.
|
|
// 실제 실행에 필요 없는 소스/문서/개발 데이터는 standalone 결과에서 제외합니다.
|
|
outputFileTracingExcludes: {
|
|
"/*": [
|
|
"./docs/**/*",
|
|
"./src/**/*",
|
|
"./scripts/**/*",
|
|
"./storage/**/*",
|
|
"./prisma/dev.db",
|
|
"./README.md",
|
|
"./AGENTS.md",
|
|
"./.env",
|
|
"./.env.*",
|
|
"./Dockerfile",
|
|
"./docker-compose.yml",
|
|
// Prisma 7 WASM 쿼리 컴파일러는 런타임에 필요하므로 제외하지 않습니다.
|
|
],
|
|
},
|
|
experimental: {
|
|
serverActions: {
|
|
// 첨부파일 업로드(최대 10개 × 50MB)를 고려한 값입니다.
|
|
bodySizeLimit: "60mb",
|
|
},
|
|
},
|
|
async redirects() {
|
|
// nginx/Apache 어느 쪽을 쓰더라도 동일하게 동작하도록 Next.js에서 처리합니다.
|
|
return [
|
|
{ source: "/index.html", destination: "/", permanent: true },
|
|
{ source: "/index.htm", destination: "/", permanent: true },
|
|
{ source: "/news", destination: "/news/notice", permanent: true },
|
|
{ source: "/board", destination: "/news/notice", permanent: true },
|
|
];
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/:path*",
|
|
headers: [
|
|
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
|
|
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
|
|
{ key: "Permissions-Policy", value: "geolocation=(), microphone=(), camera=()" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|