diff --git a/docker/prod/docker-compose.frontend.prod.yml b/docker/prod/docker-compose.frontend.prod.yml index 7878cde0..de07bec4 100644 --- a/docker/prod/docker-compose.frontend.prod.yml +++ b/docker/prod/docker-compose.frontend.prod.yml @@ -5,13 +5,13 @@ services: context: ../../frontend dockerfile: ../docker/prod/frontend.Dockerfile args: - - NEXT_PUBLIC_API_URL=http://192.168.0.70:8080/api + - NEXT_PUBLIC_API_URL=http://39.117.244.52:8080/api container_name: pms-frontend-linux ports: - "5555:5555" environment: - NODE_ENV=production - - NEXT_PUBLIC_API_URL=http://192.168.0.70:8080/api + - NEXT_PUBLIC_API_URL=http://39.117.244.52:8080/api networks: - pms-network restart: unless-stopped diff --git a/frontend/constants/auth.ts b/frontend/constants/auth.ts index 3d9b67eb..98951374 100644 --- a/frontend/constants/auth.ts +++ b/frontend/constants/auth.ts @@ -3,7 +3,7 @@ */ export const AUTH_CONFIG = { - API_BASE_URL: process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080", + API_BASE_URL: process.env.NEXT_PUBLIC_API_URL || "http://39.117.244.52:8080/api", ENDPOINTS: { LOGIN: "/auth/login", STATUS: "/auth/status", @@ -17,16 +17,9 @@ export const AUTH_CONFIG = { export const FORM_VALIDATION = { MESSAGES: { - USER_ID_REQUIRED: "사용자 ID를 입력해주세요.", - PASSWORD_REQUIRED: "비밀번호를 입력해주세요.", - LOGIN_FAILED: "로그인에 실패했습니다.", - CONNECTION_FAILED: "서버 연결에 실패했습니다. 잠시 후 다시 시도해주세요.", - BACKEND_CONNECTION_FAILED: "백엔드 서버에 연결할 수 없습니다.", + REQUIRED: "필수 입력 항목입니다.", + INVALID_FORMAT: "형식이 올바르지 않습니다.", + PASSWORD_MISMATCH: "비밀번호가 일치하지 않습니다.", + INVALID_CREDENTIALS: "아이디 또는 비밀번호가 올바르지 않습니다.", }, } as const; - -export const UI_CONFIG = { - COMPANY_NAME: "WACE 솔루션", - COPYRIGHT: "© 2025 WACE PLM Solution. All rights reserved.", - POWERED_BY: "Powered by Spring Boot + Next.js", -} as const; diff --git a/frontend/constants/layout.ts b/frontend/constants/layout.ts index 8268dbba..e245b1de 100644 --- a/frontend/constants/layout.ts +++ b/frontend/constants/layout.ts @@ -4,7 +4,7 @@ export const LAYOUT_CONFIG = { COMPANY_NAME: "WACE 솔루션", - API_BASE_URL: process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080", + API_BASE_URL: process.env.NEXT_PUBLIC_API_URL || "http://39.117.244.52:8080/api", ENDPOINTS: { USER_MENUS: "/admin/user-menus", @@ -24,18 +24,9 @@ export const LAYOUT_CONFIG = { export const MESSAGES = { LOADING: "로딩 중...", - NO_MENUS: "메뉴가 없습니다.", - PROFILE_SAVE_SUCCESS: "프로필이 성공적으로 저장되었습니다.", - PROFILE_SAVE_ERROR: "프로필 저장 중 오류가 발생했습니다.", - FILE_SIZE_ERROR: "파일 크기는 5MB를 초과할 수 없습니다.", - FILE_TYPE_ERROR: "이미지 파일만 업로드 가능합니다.", -} as const; - -export const MENU_ICONS = { - DEFAULT: "FileText", - HOME: ["홈", "메인"], - DOCUMENT: ["문서", "게시"], - USERS: ["사용자", "회원"], - STATISTICS: ["통계", "현황"], - SETTINGS: ["설정", "관리"], + ERROR: "오류가 발생했습니다.", + SUCCESS: "성공적으로 처리되었습니다.", + CONFIRM: "정말로 진행하시겠습니까?", + NO_DATA: "데이터가 없습니다.", + NO_MENUS: "사용 가능한 메뉴가 없습니다.", } as const; diff --git a/frontend/hooks/useAuth.ts b/frontend/hooks/useAuth.ts index deb05ab3..3078ca29 100644 --- a/frontend/hooks/useAuth.ts +++ b/frontend/hooks/useAuth.ts @@ -99,7 +99,7 @@ export const useAuth = () => { const [error, setError] = useState(null); // API 기본 URL 설정 - const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080"; + const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || "http://39.117.244.52:8080/api"; /** * 현재 사용자 정보 조회 diff --git a/frontend/lib/api/company.ts b/frontend/lib/api/company.ts index 0d9e85ca..ea5aa700 100644 --- a/frontend/lib/api/company.ts +++ b/frontend/lib/api/company.ts @@ -5,7 +5,7 @@ import { Company, CompanyFormData } from "@/types/company"; import { apiClient } from "./client"; -const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || "/api"; +const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || "http://39.117.244.52:8080/api"; // API 응답 타입 정의 interface ApiResponse { diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index 286faf4a..5323571a 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -43,7 +43,7 @@ const nextConfig = { // 환경 변수 (런타임에 읽기) env: { - NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || "http://192.168.0.70:8080/api", + NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || "http://39.117.244.52:8080/api", }, };