init
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
# ==============================================
|
||||
NODE_ENV=development
|
||||
|
||||
# API 설정 - 로컬 백엔드 직접 호출
|
||||
# 클라이언트 API URL
|
||||
NEXT_PUBLIC_API_URL=http://localhost:4000
|
||||
|
||||
# 서버사이드 프록시용 (next.config.ts rewrites)
|
||||
BACKEND_INTERNAL_URL=http://localhost:4000
|
||||
|
||||
# 앱 설정
|
||||
NEXT_PUBLIC_APP_NAME=한우 유전능력 시스템
|
||||
NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
# ==============================================
|
||||
NODE_ENV=development
|
||||
|
||||
# API 설정 - Nginx 프록시 경유
|
||||
NEXT_PUBLIC_API_URL=http://genome2025.turbosoft.kr:4000
|
||||
# 클라이언트 API URL (브라우저에서 호출)
|
||||
NEXT_PUBLIC_API_URL=/backend/api
|
||||
|
||||
# 서버사이드 프록시용 (next.config.ts rewrites)
|
||||
BACKEND_INTERNAL_URL=http://host.docker.internal:4000
|
||||
|
||||
# 앱 설정
|
||||
NEXT_PUBLIC_APP_NAME=한우 유전능력 시스템
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
# ==============================================
|
||||
NODE_ENV=production
|
||||
|
||||
# API 설정 - Nginx 프록시 경유
|
||||
NEXT_PUBLIC_API_URL=http://genome2025.turbosoft.kr:4000
|
||||
# 클라이언트 API URL (브라우저에서 호출)
|
||||
NEXT_PUBLIC_API_URL=/backend/api
|
||||
|
||||
# 서버사이드 프록시용 (next.config.ts rewrites)
|
||||
BACKEND_INTERNAL_URL=http://host.docker.internal:4000
|
||||
|
||||
# 앱 설정
|
||||
NEXT_PUBLIC_APP_NAME=한우 유전능력 시스템
|
||||
|
||||
11
frontend/.gitignore
vendored
11
frontend/.gitignore
vendored
@@ -9,7 +9,6 @@
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/versions
|
||||
package-lock.json
|
||||
|
||||
# ==============================================
|
||||
# Build Output
|
||||
@@ -66,3 +65,13 @@ next-env.d.ts
|
||||
.temp
|
||||
.tmp
|
||||
|
||||
# ==============================================
|
||||
# Environment Variables
|
||||
# ==============================================
|
||||
.env
|
||||
.env.local
|
||||
.env.prod
|
||||
# .env.dev는 허용 (배포용)
|
||||
!.env.dev
|
||||
!.env.example
|
||||
|
||||
|
||||
@@ -11,13 +11,11 @@ COPY package*.json ./
|
||||
# 의존성 설치
|
||||
RUN npm install
|
||||
|
||||
# 소스 코드 복사
|
||||
# 소스 코드 복사 (node_modules 제외 - .dockerignore)
|
||||
COPY . .
|
||||
|
||||
# 빌드 시 필요한 환경 변수 설정
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_PUBLIC_API_URL=/backend/api
|
||||
|
||||
# Next.js 빌드
|
||||
RUN npm run build
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
// Next.js 핵심 설정 파일, Next.js가 시작할 때 이 파일을 찾아서 읽음
|
||||
// 여기에 Next.js 설정 옵션을 정의할 수 있음
|
||||
// 백엔드 URL 설정
|
||||
// 로컬: http://localhost:4000
|
||||
// Docker: http://host.docker.internal:4000
|
||||
const BACKEND_URL = process.env.BACKEND_INTERNAL_URL || 'http://localhost:4000';
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true, // 빌드 시 ESLint warning 무시
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
typescript: {
|
||||
ignoreBuildErrors: true, // 빌드 시 TypeScript 에러 무시 (임시)
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/backend/api/:path*', // /api가 붙은 모든 요청
|
||||
destination: 'http://192.168.11.249:4000/:path*', // 백엔드 API로 요청
|
||||
source: '/backend/api/:path*',
|
||||
destination: `${BACKEND_URL}/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
// Next.js 핵심 설정 파일, Next.js가 시작할 때 이 파일을 찾아서 읽음
|
||||
// 여기에 Next.js 설정 옵션을 정의할 수 있음
|
||||
const nextConfig: NextConfig = {
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true, // 빌드 시 ESLint warning 무시
|
||||
},
|
||||
typescript: {
|
||||
ignoreBuildErrors: true, // 빌드 시 TypeScript 에러 무시 (임시)
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/backend/api/:path*', // /api가 붙은 모든 요청
|
||||
destination: 'http://192.168.11.249:4000/:path*', // 백엔드 API로 요청
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user