From e031d547958aa23292b4b4b4aa18d06a0134e10f Mon Sep 17 00:00:00 2001 From: hyeonsu Date: Thu, 28 Aug 2025 11:27:15 +0900 Subject: [PATCH] =?UTF-8?q?script=20=ED=8C=8C=EC=9D=BC=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 20 -- Dockerfile.dev | 20 -- Dockerfile.win | 47 --- backend-build-only.bat | 14 - backend-gradle-build.bat | 32 -- backend-logs.bat | 12 - backend-node/Dockerfile | 13 +- backend-node/Dockerfile.dev | 24 ++ build-windows.bat | 126 ------- compile_only.sh | 80 ----- dev-backend.bat | 57 --- dev_git_only.bat | 173 ---------- dev_git_only.sh | 145 -------- docker-compose.backend.linux.yml | 36 -- docker-compose.backend.mac.yml | 8 +- ...win.yml => docker-compose.backend.prod.yml | 14 +- docker-compose.dev.yml | 23 -- ...ux.yml => docker-compose.frontend.prod.yml | 0 docker-compose.frontend.win.yml | 25 -- docker-compose.springboot.yml | 54 --- docker-compose.win.yml | 62 ---- frontend/Dockerfile.dev | 4 +- pms-backend-win --tail 100 | 324 ------------------ quick-restart-backend.bat | 19 - restart-backend.bat | 24 -- run-windows.bat | 40 --- ...-all-separated.sh => start-all-parallel.sh | 88 +++-- start-all-separated.bat | 64 ---- start-backend-only.bat | 45 --- start-frontend-only.bat | 43 --- start-springboot.bat | 37 -- status-windows.bat | 49 --- stop-all-linux.sh | 42 --- stop-all-separated.bat | 56 --- stop-all.sh | 32 -- stop-windows.bat | 33 -- 36 files changed, 97 insertions(+), 1788 deletions(-) delete mode 100644 Dockerfile delete mode 100644 Dockerfile.dev delete mode 100644 Dockerfile.win delete mode 100644 backend-build-only.bat delete mode 100644 backend-gradle-build.bat delete mode 100644 backend-logs.bat create mode 100644 backend-node/Dockerfile.dev delete mode 100644 build-windows.bat delete mode 100644 compile_only.sh delete mode 100644 dev-backend.bat delete mode 100644 dev_git_only.bat delete mode 100644 dev_git_only.sh delete mode 100644 docker-compose.backend.linux.yml rename docker-compose.backend.win.yml => docker-compose.backend.prod.yml (72%) delete mode 100644 docker-compose.dev.yml rename docker-compose.frontend.linux.yml => docker-compose.frontend.prod.yml (100%) delete mode 100644 docker-compose.frontend.win.yml delete mode 100644 docker-compose.springboot.yml delete mode 100644 docker-compose.win.yml delete mode 100644 pms-backend-win --tail 100 delete mode 100644 quick-restart-backend.bat delete mode 100644 restart-backend.bat delete mode 100644 run-windows.bat rename start-all-separated.sh => start-all-parallel.sh (54%) delete mode 100644 start-all-separated.bat delete mode 100644 start-backend-only.bat delete mode 100644 start-frontend-only.bat delete mode 100644 start-springboot.bat delete mode 100644 status-windows.bat delete mode 100644 stop-all-linux.sh delete mode 100644 stop-all-separated.bat delete mode 100644 stop-all.sh delete mode 100644 stop-windows.bat diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3d1a3cd1..00000000 --- a/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM localhost:8787/tomcat:7.0.94-jre7-alpine.linux AS production - -# Remove default webapps -RUN rm -rf /usr/local/tomcat/webapps/* - -# Copy web application content (compiled classes and web resources) -COPY WebContent /usr/local/tomcat/webapps/ROOT -COPY src /usr/local/tomcat/webapps/ROOT/WEB-INF/src - -# Copy custom Tomcat context configuration for JNDI -COPY ./tomcat-conf/context.xml /usr/local/tomcat/conf/context.xml - -# Copy database driver if needed (PostgreSQL driver is already in WEB-INF/lib) -# COPY path/to/postgresql-driver.jar /usr/local/tomcat/lib/ - -# Expose Tomcat port -EXPOSE 8080 - -# Start Tomcat -CMD ["catalina.sh", "run"] \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index bab0fe55..00000000 --- a/Dockerfile.dev +++ /dev/null @@ -1,20 +0,0 @@ -FROM localhost:8787/tomcat:7.0.94-jre7-alpine.linux AS Development - -# Remove default webapps -RUN rm -rf /usr/local/tomcat/webapps/* - -# Copy web application content (compiled classes and web resources) -COPY WebContent /usr/local/tomcat/webapps/ROOT -COPY src /usr/local/tomcat/webapps/ROOT/WEB-INF/src - -# Copy custom Tomcat context configuration for JNDI -COPY ./tomcat-conf/context.xml /usr/local/tomcat/conf/context.xml - -# Copy database driver if needed (PostgreSQL driver is already in WEB-INF/lib) -# COPY path/to/postgresql-driver.jar /usr/local/tomcat/lib/ - -# Expose Tomcat port -EXPOSE 8080 - -# Start Tomcat -CMD ["catalina.sh", "run"] \ No newline at end of file diff --git a/Dockerfile.win b/Dockerfile.win deleted file mode 100644 index 4a4d07ee..00000000 --- a/Dockerfile.win +++ /dev/null @@ -1,47 +0,0 @@ -# 윈도우용 PLM 애플리케이션 Dockerfile -FROM tomcat:7.0.94-jre7-alpine - -# 메타데이터 -LABEL maintainer="PLM Development Team" -LABEL description="PLM Application for Windows Environment" -LABEL version="1.0" - -# 작업 디렉토리 설정 -WORKDIR /usr/local/tomcat - -# 필수 패키지 설치 (curl 포함) -RUN apk add --no-cache curl tzdata - -# 환경 변수 설정 -ENV CATALINA_HOME=/usr/local/tomcat -ENV CATALINA_BASE=/usr/local/tomcat -ENV JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m" -ENV TZ=Asia/Seoul - -# 타임존 설정 (서울) -RUN cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \ - echo "Asia/Seoul" > /etc/timezone - -# 기본 Tomcat 애플리케이션 제거 -RUN rm -rf /usr/local/tomcat/webapps/* - -# 애플리케이션 복사 -COPY WebContent/ /usr/local/tomcat/webapps/ROOT/ -COPY tomcat-conf/context.xml /usr/local/tomcat/conf/ - -# 로그 디렉토리 생성 -RUN mkdir -p /usr/local/tomcat/logs - -# 권한 설정 -RUN chmod -R 755 /usr/local/tomcat/webapps/ROOT && \ - chmod 644 /usr/local/tomcat/conf/context.xml - -# 포트 노출 -EXPOSE 8080 - -# 개선된 헬스체크 (윈도우 환경 고려) -HEALTHCHECK --interval=30s --timeout=15s --start-period=90s --retries=5 \ - CMD curl -f http://localhost:8080/ROOT/ || curl -f http://localhost:8080/ || exit 1 - -# 실행 명령 -CMD ["catalina.sh", "run"] \ No newline at end of file diff --git a/backend-build-only.bat b/backend-build-only.bat deleted file mode 100644 index 84711cbe..00000000 --- a/backend-build-only.bat +++ /dev/null @@ -1,14 +0,0 @@ -@echo off -echo ================================= -echo 백엔드 빌드만 실행 -echo ================================= - -cd /d %~dp0 - -echo [1/1] 백엔드 빌드 중... -docker-compose -f docker-compose.springboot.yml build backend - -echo. -echo 백엔드 빌드 완료! -echo. -pause \ No newline at end of file diff --git a/backend-gradle-build.bat b/backend-gradle-build.bat deleted file mode 100644 index aaf0e167..00000000 --- a/backend-gradle-build.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off -echo ================================= -echo Gradle 백엔드 로컬 빌드 -echo ================================= - -cd /d %~dp0\backend - -echo [1/3] Gradle 권한 설정... -if not exist "gradlew.bat" ( - echo gradlew.bat 파일을 찾을 수 없습니다. - pause - exit /b 1 -) - -echo [2/3] 이전 빌드 정리... -call gradlew clean - -echo [3/3] 프로젝트 빌드... -call gradlew build -x test - -if %errorlevel% equ 0 ( - echo. - echo 백엔드 빌드 성공! - echo JAR 파일 위치: backend\build\libs\ - echo. -) else ( - echo. - echo 빌드 실패! 오류를 확인하세요. - echo. -) - -pause \ No newline at end of file diff --git a/backend-logs.bat b/backend-logs.bat deleted file mode 100644 index 05f8d2ef..00000000 --- a/backend-logs.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -echo ================================= -echo 백엔드 로그 확인 -echo ================================= - -cd /d %~dp0 - -echo 백엔드 컨테이너 로그를 실시간으로 확인합니다... -echo Ctrl+C를 눌러서 종료할 수 있습니다. -echo. - -docker-compose -f docker-compose.springboot.yml logs -f backend \ No newline at end of file diff --git a/backend-node/Dockerfile b/backend-node/Dockerfile index 5385fd71..23e9210a 100644 --- a/backend-node/Dockerfile +++ b/backend-node/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update \ # Dependencies stage (install deps and generate Prisma client) FROM base AS deps COPY package*.json ./ -RUN npm ci --omit=dev && npm cache clean --force +RUN npm ci --omit=dev --prefer-offline --no-audit && npm cache clean --force # Copy prisma schema and generate client (glibc target will be detected) COPY prisma ./prisma ENV PRISMA_SKIP_POSTINSTALL_GENERATE=true @@ -22,21 +22,16 @@ RUN npx prisma generate FROM node:20-bookworm-slim AS build WORKDIR /app COPY package*.json ./ -RUN npm ci && npm cache clean --force +RUN npm ci --prefer-offline --no-audit && npm cache clean --force COPY tsconfig.json ./ COPY src ./src COPY prisma ./prisma RUN npx prisma generate RUN npm run build -# Runtime image -FROM node:20-bookworm-slim AS runner -WORKDIR /app +# Runtime image - base 이미지 재사용으로 중복 설치 제거 +FROM base AS runner ENV NODE_ENV=production -# Ensure OpenSSL present -RUN apt-get update \ - && apt-get install -y --no-install-recommends openssl ca-certificates \ - && rm -rf /var/lib/apt/lists/* # Create non-root user RUN groupadd -r appgroup && useradd -r -g appgroup appuser diff --git a/backend-node/Dockerfile.dev b/backend-node/Dockerfile.dev new file mode 100644 index 00000000..9099b18e --- /dev/null +++ b/backend-node/Dockerfile.dev @@ -0,0 +1,24 @@ +# 개발용 백엔드 Dockerfile +FROM node:20-bookworm-slim + +WORKDIR /app + +# 시스템 패키지 설치 +RUN apt-get update \ + && apt-get install -y --no-install-recommends openssl ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +# package.json 복사 및 의존성 설치 (개발 의존성 포함) +COPY package*.json ./ +RUN npm ci --prefer-offline --no-audit + +# 소스 코드는 볼륨 마운트로 처리 +# Prisma 클라이언트 생성용 스키마만 복사 +COPY prisma ./prisma +RUN npx prisma generate + +# 포트 노출 +EXPOSE 8080 + +# 개발 서버 시작 (nodemon 사용) +CMD ["npm", "run", "dev"] diff --git a/build-windows.bat b/build-windows.bat deleted file mode 100644 index edd9c295..00000000 --- a/build-windows.bat +++ /dev/null @@ -1,126 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -echo =============================================== -echo Java 애플리케이션 빌드 (윈도우용) -echo =============================================== -echo. - -REM Java 환경 확인 -echo [빌드 1] Java 환경 확인... -java -version >nul 2>&1 -if %errorlevel% neq 0 ( - echo [오류] Java가 설치되지 않았거나 PATH에 설정되지 않았습니다. - echo Java 7 이상을 설치하고 PATH를 설정해주세요. - exit /b 1 -) - -javac -version >nul 2>&1 -if %errorlevel% neq 0 ( - echo [오류] Java 컴파일러(javac)를 찾을 수 없습니다. - echo JDK가 설치되어 있는지 확인해주세요. - exit /b 1 -) -echo ✓ Java 환경 확인 완료 - -REM 빌드 디렉토리 정리 -echo [빌드 2] 이전 빌드 결과 정리... -if exist "WebContent\WEB-INF\classes" ( - rmdir /s /q "WebContent\WEB-INF\classes" -) -echo ✓ 이전 빌드 결과 정리 완료 - -REM 필요한 디렉토리 생성 -echo [빌드 3] 빌드 디렉토리 생성... -if not exist "WebContent\WEB-INF\classes" mkdir "WebContent\WEB-INF\classes" -if not exist "WebContent\WEB-INF\lib" mkdir "WebContent\WEB-INF\lib" -if not exist "logs" mkdir "logs" -echo ✓ 빌드 디렉토리 생성 완료 - -REM Servlet API JAR 확인 -echo [빌드 4] 라이브러리 의존성 확인... -set "SERVLET_JAR_1=WebContent\WEB-INF\lib\javax.servlet-api-4.0.1.jar" -set "SERVLET_JAR_2=WebContent\WEB-INF\lib\servlet-api.jar" - -if not exist "%SERVLET_JAR_1%" if not exist "%SERVLET_JAR_2%" ( - echo [오류] Servlet API JAR 파일을 찾을 수 없습니다. - echo 다음 중 하나가 필요합니다: - echo - %SERVLET_JAR_1% - echo - %SERVLET_JAR_2% - echo. - echo Maven Central에서 다운로드하거나 Tomcat lib 폴더에서 복사해주세요. - exit /b 1 -) -echo ✓ 라이브러리 의존성 확인 완료 - -REM 클래스패스 설정 -set "CLASSPATH=src;WebContent\WEB-INF\lib\*" -echo [빌드 5] 클래스패스: %CLASSPATH% - -REM Java 소스 파일 목록 생성 -echo [빌드 6] Java 소스 파일 검색... -if exist java_sources.tmp del java_sources.tmp - -set "java_count=0" -for /r src %%f in (*.java) do ( - echo %%f >> java_sources.tmp - set /a java_count+=1 -) - -if %java_count% equ 0 ( - echo [경고] 컴파일할 Java 소스 파일이 없습니다. -) else ( - echo ✓ %java_count%개의 Java 소스 파일을 찾았습니다. -) - -REM Java 컴파일 -if exist java_sources.tmp ( - echo [빌드 7] Java 소스 컴파일... - javac -encoding UTF-8 -source 1.7 -target 1.7 -d WebContent\WEB-INF\classes -cp "%CLASSPATH%" @java_sources.tmp - - if !errorlevel! neq 0 ( - echo [오류] Java 컴파일에 실패했습니다. - if exist java_sources.tmp del java_sources.tmp - exit /b 1 - ) - - del java_sources.tmp - echo ✓ Java 컴파일 완료 -) - -REM 리소스 파일 복사 -echo [빌드 8] 리소스 파일 복사... -set "resource_count=0" - -for /r src %%f in (*.xml *.properties *.sql) do ( - set "source_file=%%f" - set "relative_path=!source_file:%CD%\src\=!" - set "target_file=WebContent\WEB-INF\classes\!relative_path!" - - REM 대상 디렉토리 생성 - for %%d in ("!target_file!") do ( - if not exist "%%~dpd" mkdir "%%~dpd" 2>nul - ) - - REM 파일 복사 - copy "!source_file!" "!target_file!" >nul 2>&1 - if !errorlevel! equ 0 ( - set /a resource_count+=1 - ) else ( - echo [경고] 리소스 파일 복사 실패: !source_file! - ) -) - -echo ✓ %resource_count%개의 리소스 파일 복사 완료 - -REM 빌드 결과 요약 -echo. -echo =============================================== -echo ✓ 빌드 완료! -echo =============================================== -echo 컴파일된 클래스: WebContent\WEB-INF\classes\ -echo 라이브러리: WebContent\WEB-INF\lib\ -echo 로그 디렉토리: logs\ -echo. - -endlocal \ No newline at end of file diff --git a/compile_only.sh b/compile_only.sh deleted file mode 100644 index fba2da35..00000000 --- a/compile_only.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# MAC OS 만 실행 -# if [[ "$(uname -s)" != "Darwin" ]]; then -# echo "This script runs on MAC OS only." -# echo "Current OS: $(uname -s)" -# exit 1 -# fi - -# ---------------------------------------------------------------------- -# 기존 빌드 폴더 삭제 및 새로운 빌드 시작 -# ---------------------------------------------------------------------- -echo "Cleaning up old build artifacts..." -rm -rf WebContent/WEB-INF/classes/* - -echo "Building Java application for development..." - -# 필요한 디렉토리 생성 -mkdir -p WebContent/WEB-INF/classes -mkdir -p WebContent/WEB-INF/lib # lib 폴더 존재 확인 - -# ---------------------------------------------------------------------- -# Servlet API JAR 파일 존재 여부 확인 (단순화된 방식) -# ---------------------------------------------------------------------- -SERVLET_API_JAR_PRIMARY_PATH="WebContent/WEB-INF/lib/javax.servlet-api-4.0.1.jar" -SERVLET_API_JAR_ALTERNATIVE_PATH="WebContent/WEB-INF/lib/servlet-api.jar" - -if [ ! -f "$SERVLET_API_JAR_PRIMARY_PATH" ] && [ ! -f "$SERVLET_API_JAR_ALTERNATIVE_PATH" ]; then - echo "---------------------------------------------------------------------------------" - echo "ERROR: Servlet API JAR (javax.servlet-api-4.0.1.jar or servlet-api.jar)" - echo " not found in WebContent/WEB-INF/lib/" - echo "" - echo "Please add the appropriate Servlet API JAR for your project." - echo "You can typically find this JAR in a Tomcat distribution's 'lib' folder," - echo "or download it from a trusted source like Maven Central Repository." - echo "" - echo "Build cannot proceed without it." - echo "---------------------------------------------------------------------------------" - exit 1 -else - if [ -f "$SERVLET_API_JAR_PRIMARY_PATH" ]; then - echo "DEBUG: Confirmed Servlet API JAR is present at $SERVLET_API_JAR_PRIMARY_PATH" - elif [ -f "$SERVLET_API_JAR_ALTERNATIVE_PATH" ]; then - echo "DEBUG: Confirmed Servlet API JAR is present at $SERVLET_API_JAR_ALTERNATIVE_PATH" - fi -fi -# ---------------------------------------------------------------------- - -# 클래스패스 설정 (단순화된 방식) -EFFECTIVE_CLASSPATH="src:WebContent/WEB-INF/lib/*" -echo "DEBUG: Effective classpath for javac: $EFFECTIVE_CLASSPATH" - -# src 폴더 내의 모든 .java 파일 컴파일 -echo "Compiling Java files for development..." - -find src -name "*.java" -print0 | xargs -0 javac -encoding UTF-8 -source 1.7 -target 1.7 -d WebContent/WEB-INF/classes -cp "$EFFECTIVE_CLASSPATH" -if [ $? -ne 0 ]; then - echo "Java compilation failed. Exiting script." - exit 1 -fi - -echo "Java compilation successful." -# ---------------------------------------------------------------------- - -# src 폴더 내의 리소스 파일(.xml, .properties 등)을 classes 폴더로 복사 (macOS 호환 방식) -echo "Copying resource files for development..." -find src -type f \( -name "*.xml" -o -name "*.properties" \) | while read -r filepath; do - # 'src/' 접두사를 제거하여 상대 경로 생성 - relative_path="${filepath#src/}" - target_file="WebContent/WEB-INF/classes/$relative_path" - - # 대상 디렉토리 생성 - mkdir -p "$(dirname "$target_file")" || { echo "Error: Failed to create directory $(dirname "$target_file")"; exit 1; } - - # 파일 복사 - cp "$filepath" "$target_file" || { echo "Error: Failed to copy $filepath to $target_file"; exit 1; } -done - -echo "Java application build complete for development." -echo "Build process finished successfully!" \ No newline at end of file diff --git a/dev-backend.bat b/dev-backend.bat deleted file mode 100644 index 208efe5d..00000000 --- a/dev-backend.bat +++ /dev/null @@ -1,57 +0,0 @@ -@echo off -chcp 65001 > nul -echo ================================= -echo 백엔드 개발 관리 도구 -echo ================================= - -cd /d %~dp0 - -:menu -echo. -echo 선택하세요: -echo 1. 백엔드 재시작 (완전 재빌드) -echo 2. 백엔드 빠른 재시작 (캐시 사용) -echo 3. 백엔드 빌드만 실행 -echo 4. 백엔드 로그 실시간 확인 -echo 5. Gradle 로컬 빌드 -echo 6. 백엔드 상태 확인 -echo 0. 종료 -echo. - -set /p choice="번호를 입력하세요: " - -if "%choice%"=="1" ( - call restart-backend.bat - goto menu -) -if "%choice%"=="2" ( - call quick-restart-backend.bat - goto menu -) -if "%choice%"=="3" ( - call backend-build-only.bat - goto menu -) -if "%choice%"=="4" ( - call backend-logs.bat - goto menu -) -if "%choice%"=="5" ( - call backend-gradle-build.bat - goto menu -) -if "%choice%"=="6" ( - echo 백엔드 컨테이너 상태: - docker-compose -f docker-compose.springboot.yml ps backend - echo. - echo 아무 키나 누르세요... - pause > nul - goto menu -) -if "%choice%"=="0" ( - echo 프로그램을 종료합니다. - exit /b 0 -) - -echo 잘못된 선택입니다. 다시 선택해주세요. -goto menu \ No newline at end of file diff --git a/dev_git_only.bat b/dev_git_only.bat deleted file mode 100644 index 47f5bec6..00000000 --- a/dev_git_only.bat +++ /dev/null @@ -1,173 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -REM ---------------------------------------------------------------------- -REM 기존 빌드 폴더 삭제 및 새로운 빌드 시작 -REM ---------------------------------------------------------------------- -echo Cleaning up old build artifacts... -if exist "WebContent\WEB-INF\classes\*" ( - rmdir /s /q "WebContent\WEB-INF\classes" -) - -echo Building Java application for development... - -REM 필요한 디렉토리 생성 -if not exist "WebContent\WEB-INF\classes" mkdir "WebContent\WEB-INF\classes" -if not exist "WebContent\WEB-INF\lib" mkdir "WebContent\WEB-INF\lib" - -REM ---------------------------------------------------------------------- -REM Servlet API JAR 파일 존재 여부 확인 -REM ---------------------------------------------------------------------- -set "SERVLET_API_JAR_PRIMARY_PATH=WebContent\WEB-INF\lib\javax.servlet-api-4.0.1.jar" -set "SERVLET_API_JAR_ALTERNATIVE_PATH=WebContent\WEB-INF\lib\servlet-api.jar" - -if not exist "%SERVLET_API_JAR_PRIMARY_PATH%" if not exist "%SERVLET_API_JAR_ALTERNATIVE_PATH%" ( - echo --------------------------------------------------------------------------------- - echo ERROR: Servlet API JAR (javax.servlet-api-4.0.1.jar or servlet-api.jar^) - echo not found in WebContent\WEB-INF\lib\ - echo. - echo Please add the appropriate Servlet API JAR for your project. - echo You can typically find this JAR in a Tomcat distribution's 'lib' folder, - echo or download it from a trusted source like Maven Central Repository. - echo. - echo Build cannot proceed without it. - echo --------------------------------------------------------------------------------- - exit /b 1 -) else ( - if exist "%SERVLET_API_JAR_PRIMARY_PATH%" ( - echo DEBUG: Confirmed Servlet API JAR is present at %SERVLET_API_JAR_PRIMARY_PATH% - ) else if exist "%SERVLET_API_JAR_ALTERNATIVE_PATH%" ( - echo DEBUG: Confirmed Servlet API JAR is present at %SERVLET_API_JAR_ALTERNATIVE_PATH% - ) -) - -REM ---------------------------------------------------------------------- -REM 클래스패스 설정 -set "EFFECTIVE_CLASSPATH=src;WebContent\WEB-INF\lib\*" -echo DEBUG: Effective classpath for javac: %EFFECTIVE_CLASSPATH% - -REM src 폴더 내의 모든 .java 파일 컴파일 -echo Compiling Java files for development... - -REM Java 파일 목록을 임시 파일에 저장 -if exist temp_java_files.txt del temp_java_files.txt -for /r src %%f in (*.java) do echo %%f >> temp_java_files.txt - -if exist temp_java_files.txt ( - javac -encoding UTF-8 -source 1.7 -target 1.7 -d WebContent\WEB-INF\classes -cp "%EFFECTIVE_CLASSPATH%" @temp_java_files.txt - if !errorlevel! neq 0 ( - echo Java compilation failed. Exiting script. - del temp_java_files.txt - exit /b 1 - ) - del temp_java_files.txt -) - -echo Java compilation successful. - -REM ---------------------------------------------------------------------- -REM src 폴더 내의 리소스 파일(.xml, .properties 등)을 classes 폴더로 복사 -echo Copying resource files for development... - -for /r src %%f in (*.xml *.properties) do ( - set "filepath=%%f" - REM src\ 부분을 제거하여 상대 경로 생성 - set "relative_path=%%f" - call set "relative_path=%%relative_path:*src\=%%" - set "target_file=WebContent\WEB-INF\classes\!relative_path!" - - REM 대상 디렉토리 생성 - for %%d in ("!target_file!") do ( - if not exist "%%~dpd" mkdir "%%~dpd" - ) - - REM 파일 복사 - copy "!filepath!" "!target_file!" >nul - if !errorlevel! neq 0 ( - echo Error: Failed to copy !filepath! to !target_file! - exit /b 1 - ) -) - -echo Java application build complete for development. - -REM ---------------------------------------------------------------------- -REM Git 변경사항 커밋 및 푸시 -REM ---------------------------------------------------------------------- -git add . -git commit -am "auto commit" - -REM 현재 브랜치 확인 -for /f "tokens=*" %%i in ('git branch --show-current') do set "current_branch=%%i" - -git push origin %current_branch% - -REM 마스터 브랜치와 병합 여부 확인 -echo You are currently on branch: %current_branch% -set /p "proceed_merge=Would you like to merge the current branch with main? (Y/N) [Y]: " -if "%proceed_merge%"=="" set "proceed_merge=Y" - -if /i "%proceed_merge%"=="Y" ( - REM 마스터 브랜치로 전환 및 업데이트 - git checkout main - git pull origin main - - REM 현재 브랜치를 마스터에 병합 - git merge --no-edit %current_branch% - - REM 병합 결과 푸시 - git push origin main - - REM 원래 브랜치로 돌아가기 - git checkout %current_branch% -) - -REM 새로운 브랜치 생성 -REM 현재 날짜를 YYYYMMDD 형식으로 가져오기 -for /f "tokens=2 delims==" %%i in ('wmic OS Get localdatetime /value') do set "dt=%%i" -set "current_date=%dt:~0,8%" - -REM 브랜치 이름에서 날짜 부분 추출 -set "branch_date=%current_branch:~1,8%" - -REM 현재 날짜와 브랜치 날짜가 같으면 뒤의 2자리 숫자를 증가시킴 -if "%branch_date%"=="%current_date%" ( - set "branch_number=%current_branch:~9,2%" - set /a "branch_number=branch_number+1" -) else ( - set "branch_number=1" -) - -REM 사용 가능한 브랜치 이름 찾기 -:find_branch -if %branch_number% lss 10 ( - set "formatted_number=0%branch_number%" -) else ( - set "formatted_number=%branch_number%" -) -set "new_branch=V%current_date%%formatted_number%" - -REM 로컬과 원격에 해당 이름의 브랜치가 존재하는지 확인 -git show-ref --quiet refs/heads/%new_branch% >nul 2>&1 -if !errorlevel! equ 0 goto increment_branch - -git ls-remote --exit-code --heads origin %new_branch% >nul 2>&1 -if !errorlevel! equ 0 goto increment_branch - -goto create_branch - -:increment_branch -set /a "branch_number=branch_number+1" -goto find_branch - -:create_branch -REM 새로운 브랜치 생성 -git checkout -b %new_branch% - -REM 새로운 브랜치 푸시 -git push origin %new_branch% - -REM 변경 사항 확인 -git status - -endlocal \ No newline at end of file diff --git a/dev_git_only.sh b/dev_git_only.sh deleted file mode 100644 index 6d6cd20c..00000000 --- a/dev_git_only.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash - -# MAC OS 만 실행 -# if [[ "$(uname -s)" != "Darwin" ]]; then -# echo "This script runs on MAC OS only." -# echo "Current OS: $(uname -s)" -# exit 1 -# fi - -# ---------------------------------------------------------------------- -# 기존 빌드 폴더 삭제 및 새로운 빌드 시작 -# ---------------------------------------------------------------------- -echo "Cleaning up old build artifacts..." -rm -rf WebContent/WEB-INF/classes/* - -echo "Building Java application for development..." - -# 필요한 디렉토리 생성 -mkdir -p WebContent/WEB-INF/classes -mkdir -p WebContent/WEB-INF/lib # lib 폴더 존재 확인 - -# ---------------------------------------------------------------------- -# Servlet API JAR 파일 존재 여부 확인 (단순화된 방식) -# ---------------------------------------------------------------------- -SERVLET_API_JAR_PRIMARY_PATH="WebContent/WEB-INF/lib/javax.servlet-api-4.0.1.jar" -SERVLET_API_JAR_ALTERNATIVE_PATH="WebContent/WEB-INF/lib/servlet-api.jar" - -if [ ! -f "$SERVLET_API_JAR_PRIMARY_PATH" ] && [ ! -f "$SERVLET_API_JAR_ALTERNATIVE_PATH" ]; then - echo "---------------------------------------------------------------------------------" - echo "ERROR: Servlet API JAR (javax.servlet-api-4.0.1.jar or servlet-api.jar)" - echo " not found in WebContent/WEB-INF/lib/" - echo "" - echo "Please add the appropriate Servlet API JAR for your project." - echo "You can typically find this JAR in a Tomcat distribution's 'lib' folder," - echo "or download it from a trusted source like Maven Central Repository." - echo "" - echo "Build cannot proceed without it." - echo "---------------------------------------------------------------------------------" - exit 1 -else - if [ -f "$SERVLET_API_JAR_PRIMARY_PATH" ]; then - echo "DEBUG: Confirmed Servlet API JAR is present at $SERVLET_API_JAR_PRIMARY_PATH" - elif [ -f "$SERVLET_API_JAR_ALTERNATIVE_PATH" ]; then - echo "DEBUG: Confirmed Servlet API JAR is present at $SERVLET_API_JAR_ALTERNATIVE_PATH" - fi -fi -# ---------------------------------------------------------------------- - -# 클래스패스 설정 (단순화된 방식) -EFFECTIVE_CLASSPATH="src:WebContent/WEB-INF/lib/*" -echo "DEBUG: Effective classpath for javac: $EFFECTIVE_CLASSPATH" - -# src 폴더 내의 모든 .java 파일 컴파일 -echo "Compiling Java files for development..." - -find src -name "*.java" -print0 | xargs -0 javac -encoding UTF-8 -source 1.7 -target 1.7 -d WebContent/WEB-INF/classes -cp "$EFFECTIVE_CLASSPATH" -if [ $? -ne 0 ]; then - echo "Java compilation failed. Exiting script." - exit 1 -fi - -echo "Java compilation successful." -# ---------------------------------------------------------------------- - -# src 폴더 내의 리소스 파일(.xml, .properties 등)을 classes 폴더로 복사 (macOS 호환 방식) -echo "Copying resource files for development..." -find src -type f \( -name "*.xml" -o -name "*.properties" \) | while read -r filepath; do - # 'src/' 접두사를 제거하여 상대 경로 생성 - relative_path="${filepath#src/}" - target_file="WebContent/WEB-INF/classes/$relative_path" - - # 대상 디렉토리 생성 - mkdir -p "$(dirname "$target_file")" || { echo "Error: Failed to create directory $(dirname "$target_file")"; exit 1; } - - # 파일 복사 - cp "$filepath" "$target_file" || { echo "Error: Failed to copy $filepath to $target_file"; exit 1; } -done -# 파이프라인의 마지막 명령어의 종료 코드를 확인하기 위해 추가적인 검사가 필요할 수 있으나, -# while 루프 내에서 오류 발생 시 exit 하므로, 이 지점에 도달하면 성공으로 간주합니다. -# 만약 find가 아무 파일도 찾지 못해도 오류가 아니어야 하므로 $? 검사는 주의해야 합니다. - -echo "Java application build complete for development." -# ---------------------------------------------------------------------- -# 빌드 종료 -# ---------------------------------------------------------------------- - -# Git 변경사항 커밋 및 푸시 -git add . -git commit -am "auto commit" -current_branch=$(git branch --show-current) -git push origin $current_branch -# 마스터 브랜치와 병합 여부 확인 -echo "You are currently on branch: $current_branch" -echo "Would you like to merge the current branch with main? (Y/N) [Y]" -read proceed_merge -proceed_merge=${proceed_merge:-Y} -if [ "$proceed_merge" == "Y" ] || [ "$proceed_merge" == "y" ]; then - # 마스터 브랜치로 전환 및 업데이트 - git checkout main - git pull origin main - # 현재 브랜치를 마스터에 병합 - git merge --no-edit $current_branch - # 병합 결과 푸시 - git push origin main - # 원래 브랜치로 돌아가기 - git checkout $current_branch -fi -# 새로운 브랜치 생성 -# 현재 날짜를 YYYYMMDD 형식으로 가져오기 -current_date=$(date +'%Y%m%d') -# 브랜치 이름에서 날짜 부분 추출 -branch_date=${current_branch:1:8} -# 현재 날짜와 브랜치 날짜가 같으면 뒤의 2자리 숫자를 증가시킴 -if [ "$branch_date" == "$current_date" ]; then - # 브랜치 이름에서 뒤의 2자리 숫자 추출 - branch_number=${current_branch:9:2} - # 숫자를 10진수로 변환하고 1 증가시킴 - branch_number=$((10#$branch_number + 1)) -else - # 날짜가 다르면 01부터 시작 - branch_number=1 -fi -# 사용 가능한 브랜치 이름 찾기 -while true; do - # 2자리 숫자로 포맷팅 - formatted_number=$(printf "%02d" $branch_number) - new_branch="V${current_date}${formatted_number}" - - # 로컬과 원격에 해당 이름의 브랜치가 존재하는지 확인 - if ! git show-ref --quiet refs/heads/$new_branch && \ - ! git ls-remote --exit-code --heads origin $new_branch > /dev/null 2>&1; then - break - fi - - # 존재한다면 숫자 증가 - branch_number=$((branch_number + 1)) -done -# 새로운 브랜치 생성 -git checkout -b $new_branch -# 새로운 브랜치 푸시 (원격 브랜치로 푸시하려면 git push origin $new_branch 실행) -git push origin $new_branch -# 변경 사항 확인 -git status -# .env-dev 파일을 .env로 복사하여 원래 상태로 복원 -# docker-compose -f docker-compose-dev.yml up -d --build \ No newline at end of file diff --git a/docker-compose.backend.linux.yml b/docker-compose.backend.linux.yml deleted file mode 100644 index 39bdacb1..00000000 --- a/docker-compose.backend.linux.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: "3.8" - -services: - # Node.js 백엔드 - backend: - build: - context: ./backend-node - dockerfile: Dockerfile - container_name: pms-backend-linux - ports: - - "8080:8080" - environment: - - NODE_ENV=development - - PORT=8080 - - DATABASE_URL=postgresql://postgres:ph0909!!@39.117.244.52:11132/plm - - JWT_SECRET=ilshin-plm-super-secret-jwt-key-2024 - - JWT_EXPIRES_IN=24h - - CORS_ORIGIN=http://localhost:9771 - - CORS_CREDENTIALS=true - - LOG_LEVEL=debug - volumes: - - ./backend-node:/app - - /app/node_modules - networks: - - pms-network - restart: unless-stopped - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080/health"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 60s - -networks: - pms-network: - driver: bridge diff --git a/docker-compose.backend.mac.yml b/docker-compose.backend.mac.yml index 68a916a6..ee52c119 100644 --- a/docker-compose.backend.mac.yml +++ b/docker-compose.backend.mac.yml @@ -5,7 +5,7 @@ services: backend: build: context: ./backend-node - dockerfile: Dockerfile + dockerfile: Dockerfile.dev container_name: pms-backend-mac ports: - "8080:8080" @@ -18,9 +18,9 @@ services: - CORS_ORIGIN=http://localhost:9771 - CORS_CREDENTIALS=true - LOG_LEVEL=debug - # volumes: - # - ./backend-node:/app # 개발 모드가 아닐 때는 이 볼륨 마운트를 비활성화 - # - /app/node_modules + volumes: + - ./backend-node:/app # 개발 모드: 코드 변경 시 자동 반영 + - /app/node_modules networks: - pms-network restart: unless-stopped diff --git a/docker-compose.backend.win.yml b/docker-compose.backend.prod.yml similarity index 72% rename from docker-compose.backend.win.yml rename to docker-compose.backend.prod.yml index 67557614..bc589480 100644 --- a/docker-compose.backend.win.yml +++ b/docker-compose.backend.prod.yml @@ -1,26 +1,24 @@ version: "3.8" services: - # Node.js 백엔드 + # Node.js 백엔드 (운영용) backend: build: context: ./backend-node - dockerfile: Dockerfile - container_name: pms-backend-win + dockerfile: Dockerfile # 운영용 Dockerfile + container_name: pms-backend-prod ports: - "8080:8080" environment: - - NODE_ENV=development + - NODE_ENV=production - PORT=8080 - DATABASE_URL=postgresql://postgres:ph0909!!@39.117.244.52:11132/plm - JWT_SECRET=ilshin-plm-super-secret-jwt-key-2024 - JWT_EXPIRES_IN=24h - CORS_ORIGIN=http://localhost:9771 - CORS_CREDENTIALS=true - - LOG_LEVEL=debug - volumes: - - ./backend-node:/app - - /app/node_modules + - LOG_LEVEL=info + # 운영용에서는 볼륨 마운트 없음 (보안상 이유) networks: - pms-network restart: unless-stopped diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml deleted file mode 100644 index 203d610e..00000000 --- a/docker-compose.dev.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: '3.8' - -services: - plm: - build: - context: . - dockerfile: dockerfile.dev - container_name: plm - ports: - - "9090:8080" - environment: - CATALINA_OPTS: >- - -DDB_URL=jdbc:postgresql://39.117.244.52:11132/plm - -DDB_USERNAME=postgres - -DDB_PASSWORD=ph0909!! - volumes: - - plm-project_data:/data_storage - - plm-app_data:/path/inside/container - restart: unless-stopped - -volumes: - plm-project_data: - plm-app_data: diff --git a/docker-compose.frontend.linux.yml b/docker-compose.frontend.prod.yml similarity index 100% rename from docker-compose.frontend.linux.yml rename to docker-compose.frontend.prod.yml diff --git a/docker-compose.frontend.win.yml b/docker-compose.frontend.win.yml deleted file mode 100644 index d8865567..00000000 --- a/docker-compose.frontend.win.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: "3.8" - -services: - # Next.js 프론트엔드만 - frontend: - build: - context: ./frontend - dockerfile: Dockerfile.dev - container_name: pms-frontend-win - ports: - - "9771:3000" - environment: - - NEXT_PUBLIC_API_URL=http://localhost:8080/api - volumes: - - ./frontend:/app - - /app/node_modules - - /app/.next - networks: - - pms-network - restart: unless-stopped - -networks: - pms-network: - driver: bridge - external: true diff --git a/docker-compose.springboot.yml b/docker-compose.springboot.yml deleted file mode 100644 index 1894d774..00000000 --- a/docker-compose.springboot.yml +++ /dev/null @@ -1,54 +0,0 @@ -version: '3.8' - -services: - # Spring Boot 백엔드 - backend: - build: - context: ./backend - dockerfile: Dockerfile - container_name: pms-backend - ports: - - "8080:8080" - environment: - - SPRING_PROFILES_ACTIVE=dev - - SPRING_DATASOURCE_URL=jdbc:postgresql://39.117.244.52:11132/plm?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Seoul - - SPRING_DATASOURCE_USERNAME=postgres - - SPRING_DATASOURCE_PASSWORD=ph0909!! - - LANG=ko_KR.UTF-8 - - LANGUAGE=ko_KR:ko - - LC_ALL=ko_KR.UTF-8 - - TZ=Asia/Seoul - - JAVA_OPTS=-Xms512m -Xmx1024m -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Seoul -Djava.awt.headless=true - networks: - - pms-network - restart: unless-stopped - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080/api/actuator/health"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 60s - - # Next.js 프론트엔드 - frontend: - build: - context: ./frontend - dockerfile: Dockerfile.dev - container_name: pms-frontend - ports: - - "3000:3000" - environment: - - NEXT_PUBLIC_API_URL=http://localhost:8080/api - volumes: - - ./frontend:/app - - /app/node_modules - - /app/.next - networks: - - pms-network - restart: unless-stopped - depends_on: - - backend - -networks: - pms-network: - driver: bridge \ No newline at end of file diff --git a/docker-compose.win.yml b/docker-compose.win.yml deleted file mode 100644 index 67d83bc6..00000000 --- a/docker-compose.win.yml +++ /dev/null @@ -1,62 +0,0 @@ -services: - # 백엔드 서비스 (기존) - plm-app: - build: - context: . - dockerfile: Dockerfile.win - platforms: - - linux/amd64 - container_name: plm-windows - ports: - - "9090:8080" - environment: - - CATALINA_OPTS=-DDB_URL=jdbc:postgresql://39.117.244.52:11132/plm -DDB_USERNAME=postgres -DDB_PASSWORD=ph0909!! -Xms512m -Xmx1024m - - TZ=Asia/Seoul - - APP_ENV=development - - LOG_LEVEL=INFO - - DB_HOST=39.117.244.52 - - DB_PORT=11132 - - DB_NAME=plm - - DB_USERNAME=postgres - - DB_PASSWORD=ph0909!! - volumes: - - plm-win-project:/data_storage - - plm-win-app:/app_data - - ./logs:/usr/local/tomcat/logs - - ./WebContent:/usr/local/tomcat/webapps/ROOT - restart: unless-stopped - networks: - - plm-network - - # 프론트엔드 서비스 (새로 추가) - plm-frontend: - build: - context: ./frontend - dockerfile: Dockerfile.dev - container_name: plm-frontend - ports: - - "3000:3000" - environment: - - NODE_ENV=development - - TZ=Asia/Seoul - - NEXT_PUBLIC_API_URL=http://localhost:9090 - - WATCHPACK_POLLING=true - volumes: - - ./frontend:/app - - /app/node_modules - - /app/.next - depends_on: - - plm-app - restart: unless-stopped - networks: - - plm-network - -volumes: - plm-win-project: - driver: local - plm-win-app: - driver: local - -networks: - plm-network: - driver: bridge \ No newline at end of file diff --git a/frontend/Dockerfile.dev b/frontend/Dockerfile.dev index de7f23d7..390e8324 100644 --- a/frontend/Dockerfile.dev +++ b/frontend/Dockerfile.dev @@ -7,8 +7,8 @@ WORKDIR /app # package.json과 package-lock.json 복사 COPY package*.json ./ -# 의존성 설치 (개발 의존성 포함) -RUN npm ci +# 의존성 설치 (개발 의존성 포함) - 최적화 옵션 추가 +RUN npm ci --prefer-offline --no-audit # 소스 코드 복사 COPY . . diff --git a/pms-backend-win --tail 100 b/pms-backend-win --tail 100 deleted file mode 100644 index 74570f66..00000000 --- a/pms-backend-win --tail 100 +++ /dev/null @@ -1,324 +0,0 @@ - - SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS - - Commands marked with * may be preceded by a number, _N. - Notes in parentheses indicate the behavior if _N is given. - A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K. - - h H Display this help. - q :q Q :Q ZZ Exit. - --------------------------------------------------------------------------- - - MMOOVVIINNGG - - e ^E j ^N CR * Forward one line (or _N lines). - y ^Y k ^K ^P * Backward one line (or _N lines). - ESC-j * Forward one file line (or _N file lines). - ESC-k * Backward one file line (or _N file lines). - f ^F ^V SPACE * Forward one window (or _N lines). - b ^B ESC-v * Backward one window (or _N lines). - z * Forward one window (and set window to _N). - w * Backward one window (and set window to _N). - ESC-SPACE * Forward one window, but don't stop at end-of-file. - ESC-b * Backward one window, but don't stop at beginning-of-file. - d ^D * Forward one half-window (and set half-window to _N). - u ^U * Backward one half-window (and set half-window to _N). - ESC-) RightArrow * Right one half screen width (or _N positions). - ESC-( LeftArrow * Left one half screen width (or _N positions). - ESC-} ^RightArrow Right to last column displayed. - ESC-{ ^LeftArrow Left to first column. - F Forward forever; like "tail -f". - ESC-F Like F but stop when search pattern is found. - r ^R ^L Repaint screen. - R Repaint screen, discarding buffered input. - --------------------------------------------------- - Default "window" is the screen height. - Default "half-window" is half of the screen height. - --------------------------------------------------------------------------- - - SSEEAARRCCHHIINNGG - - /_p_a_t_t_e_r_n * Search forward for (_N-th) matching line. - ?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line. - n * Repeat previous search (for _N-th occurrence). - N * Repeat previous search in reverse direction. - ESC-n * Repeat previous search, spanning files. - ESC-N * Repeat previous search, reverse dir. & spanning files. - ^O^N ^On * Search forward for (_N-th) OSC8 hyperlink. - ^O^P ^Op * Search backward for (_N-th) OSC8 hyperlink. - ^O^L ^Ol Jump to the currently selected OSC8 hyperlink. - ESC-u Undo (toggle) search highlighting. - ESC-U Clear search highlighting. - &_p_a_t_t_e_r_n * Display only matching lines. - --------------------------------------------------- - Search is case-sensitive unless changed with -i or -I. - A search pattern may begin with one or more of: - ^N or ! Search for NON-matching lines. - ^E or * Search multiple files (pass thru END OF FILE). - ^F or @ Start search at FIRST file (for /) or last file (for ?). - ^K Highlight matches, but don't move (KEEP position). - ^R Don't use REGULAR EXPRESSIONS. - ^S _n Search for match in _n-th parenthesized subpattern. - ^W WRAP search if no match found. - ^L Enter next character literally into pattern. - --------------------------------------------------------------------------- - - JJUUMMPPIINNGG - - g < ESC-< * Go to first line in file (or line _N). - G > ESC-> * Go to last line in file (or line _N). - p % * Go to beginning of file (or _N percent into file). - t * Go to the (_N-th) next tag. - T * Go to the (_N-th) previous tag. - { ( [ * Find close bracket } ) ]. - } ) ] * Find open bracket { ( [. - ESC-^F _<_c_1_> _<_c_2_> * Find close bracket _<_c_2_>. - ESC-^B _<_c_1_> _<_c_2_> * Find open bracket _<_c_1_>. - --------------------------------------------------- - Each "find close bracket" command goes forward to the close bracket - matching the (_N-th) open bracket in the top line. - Each "find open bracket" command goes backward to the open bracket - matching the (_N-th) close bracket in the bottom line. - - m_<_l_e_t_t_e_r_> Mark the current top line with . - M_<_l_e_t_t_e_r_> Mark the current bottom line with . - '_<_l_e_t_t_e_r_> Go to a previously marked position. - '' Go to the previous position. - ^X^X Same as '. - ESC-m_<_l_e_t_t_e_r_> Clear a mark. - --------------------------------------------------- - A mark is any upper-case or lower-case letter. - Certain marks are predefined: - ^ means beginning of the file - $ means end of the file - --------------------------------------------------------------------------- - - CCHHAANNGGIINNGG FFIILLEESS - - :e [_f_i_l_e] Examine a new file. - ^X^V Same as :e. - :n * Examine the (_N-th) next file from the command line. - :p * Examine the (_N-th) previous file from the command line. - :x * Examine the first (or _N-th) file from the command line. - ^O^O Open the currently selected OSC8 hyperlink. - :d Delete the current file from the command line list. - = ^G :f Print current file name. - --------------------------------------------------------------------------- - - MMIISSCCEELLLLAANNEEOOUUSS CCOOMMMMAANNDDSS - - -_<_f_l_a_g_> Toggle a command line option [see OPTIONS below]. - --_<_n_a_m_e_> Toggle a command line option, by name. - __<_f_l_a_g_> Display the setting of a command line option. - ___<_n_a_m_e_> Display the setting of an option, by name. - +_c_m_d Execute the less cmd each time a new file is examined. - - !_c_o_m_m_a_n_d Execute the shell command with $SHELL. - #_c_o_m_m_a_n_d Execute the shell command, expanded like a prompt. - |XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command. - s _f_i_l_e Save input to a file. - v Edit the current file with $VISUAL or $EDITOR. - V Print version number of "less". - --------------------------------------------------------------------------- - - OOPPTTIIOONNSS - - Most options may be changed either on the command line, - or from within less by using the - or -- command. - Options may be given in one of two forms: either a single - character preceded by a -, or a name preceded by --. - - -? ........ --help - Display help (from command line). - -a ........ --search-skip-screen - Search skips current screen. - -A ........ --SEARCH-SKIP-SCREEN - Search starts just after target line. - -b [_N] .... --buffers=[_N] - Number of buffers. - -B ........ --auto-buffers - Don't automatically allocate buffers for pipes. - -c ........ --clear-screen - Repaint by clearing rather than scrolling. - -d ........ --dumb - Dumb terminal. - -D xx_c_o_l_o_r . --color=xx_c_o_l_o_r - Set screen colors. - -e -E .... --quit-at-eof --QUIT-AT-EOF - Quit at end of file. - -f ........ --force - Force open non-regular files. - -F ........ --quit-if-one-screen - Quit if entire file fits on first screen. - -g ........ --hilite-search - Highlight only last match for searches. - -G ........ --HILITE-SEARCH - Don't highlight any matches for searches. - -h [_N] .... --max-back-scroll=[_N] - Backward scroll limit. - -i ........ --ignore-case - Ignore case in searches that do not contain uppercase. - -I ........ --IGNORE-CASE - Ignore case in all searches. - -j [_N] .... --jump-target=[_N] - Screen position of target lines. - -J ........ --status-column - Display a status column at left edge of screen. - -k _f_i_l_e ... --lesskey-file=_f_i_l_e - Use a compiled lesskey file. - -K ........ --quit-on-intr - Exit less in response to ctrl-C. - -L ........ --no-lessopen - Ignore the LESSOPEN environment variable. - -m -M .... --long-prompt --LONG-PROMPT - Set prompt style. - -n ......... --line-numbers - Suppress line numbers in prompts and messages. - -N ......... --LINE-NUMBERS - Display line number at start of each line. - -o [_f_i_l_e] .. --log-file=[_f_i_l_e] - Copy to log file (standard input only). - -O [_f_i_l_e] .. --LOG-FILE=[_f_i_l_e] - Copy to log file (unconditionally overwrite). - -p _p_a_t_t_e_r_n . --pattern=[_p_a_t_t_e_r_n] - Start at pattern (from command line). - -P [_p_r_o_m_p_t] --prompt=[_p_r_o_m_p_t] - Define new prompt. - -q -Q .... --quiet --QUIET --silent --SILENT - Quiet the terminal bell. - -r -R .... --raw-control-chars --RAW-CONTROL-CHARS - Output "raw" control characters. - -s ........ --squeeze-blank-lines - Squeeze multiple blank lines. - -S ........ --chop-long-lines - Chop (truncate) long lines rather than wrapping. - -t _t_a_g .... --tag=[_t_a_g] - Find a tag. - -T [_t_a_g_s_f_i_l_e] --tag-file=[_t_a_g_s_f_i_l_e] - Use an alternate tags file. - -u -U .... --underline-special --UNDERLINE-SPECIAL - Change handling of backspaces, tabs and carriage returns. - -V ........ --version - Display the version number of "less". - -w ........ --hilite-unread - Highlight first new line after forward-screen. - -W ........ --HILITE-UNREAD - Highlight first new line after any forward movement. - -x [_N[,...]] --tabs=[_N[,...]] - Set tab stops. - -X ........ --no-init - Don't use termcap init/deinit strings. - -y [_N] .... --max-forw-scroll=[_N] - Forward scroll limit. - -z [_N] .... --window=[_N] - Set size of window. - -" [_c[_c]] . --quotes=[_c[_c]] - Set shell quote characters. - -~ ........ --tilde - Don't display tildes after end of file. - -# [_N] .... --shift=[_N] - Set horizontal scroll amount (0 = one half screen width). - - --exit-follow-on-close - Exit F command on a pipe when writer closes pipe. - --file-size - Automatically determine the size of the input file. - --follow-name - The F command changes files if the input file is renamed. - --form-feed - Stop scrolling when a form feed character is reached. - --header=[_L[,_C[,_N]]] - Use _L lines (starting at line _N) and _C columns as headers. - --incsearch - Search file as each pattern character is typed in. - --intr=[_C] - Use _C instead of ^X to interrupt a read. - --lesskey-context=_t_e_x_t - Use lesskey source file contents. - --lesskey-src=_f_i_l_e - Use a lesskey source file. - --line-num-width=[_N] - Set the width of the -N line number field to _N characters. - --match-shift=[_N] - Show at least _N characters to the left of a search match. - --modelines=[_N] - Read _N lines from the input file and look for vim modelines. - --mouse - Enable mouse input. - --no-edit-warn - Don't warn when using v command on a file opened via LESSOPEN. - --no-keypad - Don't send termcap keypad init/deinit strings. - --no-histdups - Remove duplicates from command history. - --no-number-headers - Don't give line numbers to header lines. - --no-paste - Ignore pasted input. - --no-search-header-lines - Searches do not include header lines. - --no-search-header-columns - Searches do not include header columns. - --no-search-headers - Searches do not include header lines or columns. - --no-vbell - Disable the terminal's visual bell. - --redraw-on-quit - Redraw final screen when quitting. - --rscroll=[_C] - Set the character used to mark truncated lines. - --save-marks - Retain marks across invocations of less. - --search-options=[EFKNRW-] - Set default options for every search. - --show-preproc-errors - Display a message if preprocessor exits with an error status. - --proc-backspace - Process backspaces for bold/underline. - --PROC-BACKSPACE - Treat backspaces as control characters. - --proc-return - Delete carriage returns before newline. - --PROC-RETURN - Treat carriage returns as control characters. - --proc-tab - Expand tabs to spaces. - --PROC-TAB - Treat tabs as control characters. - --status-col-width=[_N] - Set the width of the -J status column to _N characters. - --status-line - Highlight or color the entire line containing a mark. - --use-backslash - Subsequent options use backslash as escape char. - --use-color - Enables colored text. - --wheel-lines=[_N] - Each click of the mouse wheel moves _N lines. - --wordwrap - Wrap lines at spaces. - - - --------------------------------------------------------------------------- - - LLIINNEE EEDDIITTIINNGG - - These keys can be used to edit text being entered - on the "command line" at the bottom of the screen. - - RightArrow ..................... ESC-l ... Move cursor right one character. - LeftArrow ...................... ESC-h ... Move cursor left one character. - ctrl-RightArrow ESC-RightArrow ESC-w ... Move cursor right one word. - ctrl-LeftArrow ESC-LeftArrow ESC-b ... Move cursor left one word. - HOME ........................... ESC-0 ... Move cursor to start of line. - END ............................ ESC-$ ... Move cursor to end of line. - BACKSPACE ................................ Delete char to left of cursor. - DELETE ......................... ESC-x ... Delete char under cursor. - ctrl-BACKSPACE ESC-BACKSPACE ........... Delete word to left of cursor. - ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor. - ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line. - UpArrow ........................ ESC-k ... Retrieve previous command line. - DownArrow ...................... ESC-j ... Retrieve next command line. - TAB ...................................... Complete filename & cycle. - SHIFT-TAB ...................... ESC-TAB Complete filename & reverse cycle. - ctrl-L ................................... Complete filename, list all. diff --git a/quick-restart-backend.bat b/quick-restart-backend.bat deleted file mode 100644 index 310a7214..00000000 --- a/quick-restart-backend.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -echo ================================= -echo 백엔드 빠른 재시작 스크립트 -echo ================================= - -cd /d %~dp0 - -echo [1/2] 백엔드 컨테이너 재시작 중... -docker-compose -f docker-compose.springboot.yml restart backend - -echo [2/2] 상태 확인 중... -timeout /t 5 > nul -docker-compose -f docker-compose.springboot.yml ps backend - -echo. -echo 백엔드 빠른 재시작 완료! -echo 접속 URL: http://localhost:8080 -echo. -pause \ No newline at end of file diff --git a/restart-backend.bat b/restart-backend.bat deleted file mode 100644 index 37d54d37..00000000 --- a/restart-backend.bat +++ /dev/null @@ -1,24 +0,0 @@ -@echo off -echo ================================= -echo 백엔드 재시작 스크립트 -echo ================================= - -cd /d %~dp0 - -echo [1/3] 백엔드 컨테이너 중지 중... -docker-compose -f docker-compose.springboot.yml stop backend - -echo [2/3] 백엔드 컨테이너 재빌드 중... -docker-compose -f docker-compose.springboot.yml build --no-cache backend - -echo [3/3] 백엔드 컨테이너 시작 중... -docker-compose -f docker-compose.springboot.yml up -d backend - -echo. -echo 백엔드 재시작 완료! -echo 접속 URL: http://localhost:8080 -echo. - -echo 로그 확인을 원하시면 아무 키나 누르세요... -pause > nul -docker-compose -f docker-compose.springboot.yml logs -f backend \ No newline at end of file diff --git a/run-windows.bat b/run-windows.bat deleted file mode 100644 index 39c84ab3..00000000 --- a/run-windows.bat +++ /dev/null @@ -1,40 +0,0 @@ -@echo off - -echo ===================================== -echo PLM 솔루션 - Windows 시작 -echo ===================================== - -echo 기존 컨테이너 정리 중... -docker-compose -f docker-compose.win.yml down 2>nul - -echo PLM 서비스 시작 중... -docker-compose -f docker-compose.win.yml up --build --force-recreate -d - -if %errorlevel% equ 0 ( - echo. - echo ✅ PLM 서비스가 성공적으로 시작되었습니다! - echo. - echo 🌐 접속 URL: - echo • 프론트엔드 (Next.js): http://localhost:3000 - echo • 백엔드 (Spring/JSP): http://localhost:9090 - echo. - echo 📋 서비스 상태 확인: - echo docker-compose -f docker-compose.win.yml ps - echo. - echo 📊 로그 확인: - echo docker-compose -f docker-compose.win.yml logs - echo. - echo 5초 후 프론트엔드 페이지를 자동으로 엽니다... - timeout /t 5 /nobreak >nul - start http://localhost:3000 -) else ( - echo. - echo ❌ PLM 서비스 시작에 실패했습니다! - echo. - echo 🔍 문제 해결 방법: - echo 1. Docker Desktop이 실행 중인지 확인 - echo 2. 포트가 사용 중인지 확인 (3000, 9090) - echo 3. 로그 확인: docker-compose -f docker-compose.win.yml logs - echo. - pause -) \ No newline at end of file diff --git a/start-all-separated.sh b/start-all-parallel.sh similarity index 54% rename from start-all-separated.sh rename to start-all-parallel.sh index 40bbde76..dfe34b15 100755 --- a/start-all-separated.sh +++ b/start-all-parallel.sh @@ -5,12 +5,12 @@ START_TIME=$(date +%s) START_TIME_FORMATTED=$(date '+%Y-%m-%d %H:%M:%S') echo "============================================" -echo "PLM 솔루션 - 전체 서비스 시작 (분리형)" +echo "PLM 솔루션 - 전체 서비스 시작 (병렬 최적화)" echo "============================================" echo "🕐 시작 시간: $START_TIME_FORMATTED" echo "" -echo "🚀 백엔드(Node.js)와 프론트엔드(Next.js)를 순차적으로 시작합니다..." +echo "🚀 백엔드와 프론트엔드를 병렬로 빌드 및 시작합니다..." echo "" # 기존 컨테이너 강제 삭제 (이름 충돌 방지) @@ -19,47 +19,73 @@ echo "0. 기존 컨테이너 정리 중..." echo "============================================" docker rm -f pms-backend-mac pms-frontend-mac 2>/dev/null || echo "기존 컨테이너가 없습니다." docker network rm pms-network 2>/dev/null || echo "기존 네트워크가 없습니다." +docker network create pms-network 2>/dev/null || echo "네트워크를 생성했습니다." echo "" -# 백엔드 먼저 시작 -BACKEND_START=$(date +%s) +# 병렬 빌드 시작 +PARALLEL_START=$(date +%s) echo "============================================" -echo "1. 백엔드 서비스 시작 중... (Node.js)" +echo "1. 병렬 빌드 시작 (백엔드 + 프론트엔드)" echo "============================================" -docker-compose -f docker-compose.backend.mac.yml build --no-cache -docker-compose -f docker-compose.backend.mac.yml down -v -docker network create pms-network 2>/dev/null || echo "네트워크가 이미 존재합니다." -docker-compose -f docker-compose.backend.mac.yml up -d +# 백엔드 빌드 (백그라운드) +echo "🔧 백엔드 빌드 시작..." +( + docker-compose -f docker-compose.backend.mac.yml build + echo "✅ 백엔드 빌드 완료" +) & +BACKEND_PID=$! -echo "" -echo "⏳ 백엔드 서비스 안정화 대기 중... (20초)" -sleep 20 +# 프론트엔드 빌드 (백그라운드) +echo "🔧 프론트엔드 빌드 시작..." +( + docker-compose -f docker-compose.frontend.mac.yml build + echo "✅ 프론트엔드 빌드 완료" +) & +FRONTEND_PID=$! -# 백엔드 완료 시간 -BACKEND_END=$(date +%s) -BACKEND_DURATION=$((BACKEND_END - BACKEND_START)) -echo "✅ 백엔드 완료 (${BACKEND_DURATION}초 소요)" +# 두 빌드가 모두 완료될 때까지 대기 +echo "⏳ 병렬 빌드 진행 중..." +wait $BACKEND_PID +wait $FRONTEND_PID -# 프론트엔드 시작 -FRONTEND_START=$(date +%s) +PARALLEL_END=$(date +%s) +PARALLEL_DURATION=$((PARALLEL_END - PARALLEL_START)) +echo "✅ 병렬 빌드 완료 (${PARALLEL_DURATION}초 소요)" + +# 서비스 시작 echo "" echo "============================================" -echo "2. 프론트엔드 서비스 시작 중... (Next.js)" +echo "2. 서비스 시작 중..." echo "============================================" -docker-compose -f docker-compose.frontend.mac.yml build --no-cache -docker-compose -f docker-compose.frontend.mac.yml down -v -docker-compose -f docker-compose.frontend.mac.yml up -d +SERVICE_START=$(date +%s) + +# 기존 컨테이너 정리 +docker-compose -f docker-compose.backend.mac.yml down -v 2>/dev/null +docker-compose -f docker-compose.frontend.mac.yml down -v 2>/dev/null + +# 백엔드 시작 (백그라운드) +echo "🚀 백엔드 서비스 시작..." +docker-compose -f docker-compose.backend.mac.yml up -d & +BACKEND_START_PID=$! + +# 프론트엔드 시작 (백그라운드) +echo "🚀 프론트엔드 서비스 시작..." +docker-compose -f docker-compose.frontend.mac.yml up -d & +FRONTEND_START_PID=$! + +# 서비스 시작 완료 대기 +wait $BACKEND_START_PID +wait $FRONTEND_START_PID echo "" -echo "⏳ 프론트엔드 서비스 안정화 대기 중... (10초)" -sleep 10 +echo "⏳ 서비스 안정화 대기 중... (8초)" +sleep 8 -# 프론트엔드 완료 시간 -FRONTEND_END=$(date +%s) -FRONTEND_DURATION=$((FRONTEND_END - FRONTEND_START)) -echo "✅ 프론트엔드 완료 (${FRONTEND_DURATION}초 소요)" +SERVICE_END=$(date +%s) +SERVICE_DURATION=$((SERVICE_END - SERVICE_START)) +echo "✅ 서비스 시작 완료 (${SERVICE_DURATION}초 소요)" echo "" echo "============================================" @@ -96,8 +122,8 @@ echo "🕐 종료 시간: $END_TIME_FORMATTED" echo "⏱️ 총 소요 시간: ${MINUTES}분 ${SECONDS}초" echo "" echo "📊 단계별 소요 시간:" -echo " • 백엔드 서비스: ${BACKEND_DURATION}초" -echo " • 프론트엔드 서비스: ${FRONTEND_DURATION}초" +echo " • 병렬 빌드: ${PARALLEL_DURATION}초" +echo " • 서비스 시작: ${SERVICE_DURATION}초" echo "============================================" -read -p "계속하려면 아무 키나 누르세요..." \ No newline at end of file +read -p "계속하려면 아무 키나 누르세요..." diff --git a/start-all-separated.bat b/start-all-separated.bat deleted file mode 100644 index b7bb3725..00000000 --- a/start-all-separated.bat +++ /dev/null @@ -1,64 +0,0 @@ -@echo off -chcp 65001 >nul - -echo ============================================ -echo PLM 솔루션 - 전체 서비스 시작 (분리형) -echo ============================================ - -echo. -echo 🚀 백엔드와 프론트엔드를 순차적으로 시작합니다... -echo. - -REM 백엔드 먼저 시작 -echo ============================================ -echo 1. 백엔드 서비스 시작 중... -echo ============================================ - -docker-compose -f docker-compose.backend.win.yml build --no-cache -docker-compose -f docker-compose.backend.win.yml down -v -docker network create pms-network 2>nul || echo 네트워크가 이미 존재합니다. -docker-compose -f docker-compose.backend.win.yml up -d - -echo. -echo ⏳ 백엔드 서비스 안정화 대기 중... (20초) -timeout /t 20 /nobreak >nul - -REM 프론트엔드 시작 -echo. -echo ============================================ -echo 2. 프론트엔드 서비스 시작 중... -echo ============================================ - -docker-compose -f docker-compose.frontend.win.yml build --no-cache -docker-compose -f docker-compose.frontend.win.yml down -v -docker-compose -f docker-compose.frontend.win.yml up -d - -echo. -echo ⏳ 프론트엔드 서비스 안정화 대기 중... (10초) -timeout /t 10 /nobreak >nul - -echo. -echo ============================================ -echo 🎉 모든 서비스가 시작되었습니다! -echo ============================================ -echo. -echo [DATABASE] PostgreSQL: http://39.117.244.52:11132 -echo [BACKEND] Spring Boot: http://localhost:8080/api -echo [FRONTEND] Next.js: http://localhost:9771 -echo. -echo 서비스 상태 확인: -echo 백엔드: docker-compose -f docker-compose.backend.win.yml ps -echo 프론트엔드: docker-compose -f docker-compose.frontend.win.yml ps -echo. -echo 로그 확인: -echo 백엔드: docker-compose -f docker-compose.backend.win.yml logs -f -echo 프론트엔드: docker-compose -f docker-compose.frontend.win.yml logs -f -echo. -echo 서비스 중지: -echo 백엔드: docker-compose -f docker-compose.backend.win.yml down -echo 프론트엔드: docker-compose -f docker-compose.frontend.win.yml down -echo 전체: stop-all-separated.bat -echo. -echo ============================================ - -pause diff --git a/start-backend-only.bat b/start-backend-only.bat deleted file mode 100644 index fe034008..00000000 --- a/start-backend-only.bat +++ /dev/null @@ -1,45 +0,0 @@ -@echo off -chcp 65001 >nul - -echo ============================================ -echo PLM 솔루션 - 백엔드 서비스 시작 -echo ============================================ - -echo. -echo 🚀 백엔드 서비스를 시작합니다... -echo. - -REM 백엔드 시작 -echo ============================================ -echo 백엔드 서비스 시작 중... -echo ============================================ - -docker-compose -f docker-compose.backend.win.yml build --no-cache -docker-compose -f docker-compose.backend.win.yml down -v -docker network create pms-network 2>nul || echo 네트워크가 이미 존재합니다. -docker-compose -f docker-compose.backend.win.yml up -d - -echo. -echo ⏳ 백엔드 서비스 안정화 대기 중... (15초) -timeout /t 15 /nobreak >nul - -echo. -echo ============================================ -echo 🎉 백엔드 서비스가 시작되었습니다! -echo ============================================ -echo. -echo [DATABASE] PostgreSQL: http://39.117.244.52:11132 -echo [BACKEND] Spring Boot: http://localhost:8080/api -echo. -echo 서비스 상태 확인: -echo docker-compose -f docker-compose.backend.win.yml ps -echo. -echo 로그 확인: -echo docker-compose -f docker-compose.backend.win.yml logs -f -echo. -echo 서비스 중지: -echo docker-compose -f docker-compose.backend.win.yml down -echo. -echo ============================================ - -pause diff --git a/start-frontend-only.bat b/start-frontend-only.bat deleted file mode 100644 index 1448134f..00000000 --- a/start-frontend-only.bat +++ /dev/null @@ -1,43 +0,0 @@ -@echo off -chcp 65001 >nul - -echo ============================================ -echo PLM 솔루션 - 프론트엔드 서비스 시작 -echo ============================================ - -echo. -echo 🚀 프론트엔드 서비스를 시작합니다... -echo. - -REM 프론트엔드 시작 -echo ============================================ -echo 프론트엔드 서비스 시작 중... -echo ============================================ - -docker-compose -f docker-compose.frontend.win.yml build --no-cache -docker-compose -f docker-compose.frontend.win.yml down -v -docker-compose -f docker-compose.frontend.win.yml up -d - -echo. -echo ⏳ 프론트엔드 서비스 안정화 대기 중... (10초) -timeout /t 10 /nobreak >nul - -echo. -echo ============================================ -echo 🎉 프론트엔드 서비스가 시작되었습니다! -echo ============================================ -echo. -echo [FRONTEND] Next.js: http://localhost:9771 -echo. -echo 서비스 상태 확인: -echo docker-compose -f docker-compose.frontend.win.yml ps -echo. -echo 로그 확인: -echo docker-compose -f docker-compose.frontend.win.yml logs -f -echo. -echo 서비스 중지: -echo docker-compose -f docker-compose.frontend.win.yml down -echo. -echo ============================================ - -pause diff --git a/start-springboot.bat b/start-springboot.bat deleted file mode 100644 index 7aa169a9..00000000 --- a/start-springboot.bat +++ /dev/null @@ -1,37 +0,0 @@ -@echo off -echo ============================================ -echo PLM 솔루션 - Spring Boot 버전 시작 -echo ============================================ - -echo. -echo 1. Docker 이미지 빌드 중... -docker-compose -f docker-compose.springboot.yml build --no-cache - -echo. -echo 2. 기존 컨테이너 정리 중... -docker-compose -f docker-compose.springboot.yml down -v - -echo. -echo 3. 컨테이너 시작 중... -docker-compose -f docker-compose.springboot.yml up -d - -echo. -echo 4. 서비스 상태 확인 중... -timeout /t 10 /nobreak >nul - -echo. -echo ============================================ -echo 서비스가 시작되었습니다! -echo ============================================ -echo. -echo [DATABASE] PostgreSQL: http://localhost: - -echo [BACKEND] Spring Boot: http://localhost:8080/api -echo [FRONTEND] Next.js: http://localhost:3000 -echo. -echo 로그 확인: docker-compose -f docker-compose.springboot.yml logs -f -echo 중지하기: docker-compose -f docker-compose.springboot.yml down -echo. -echo ============================================ - -pause \ No newline at end of file diff --git a/status-windows.bat b/status-windows.bat deleted file mode 100644 index 7dd1f55d..00000000 --- a/status-windows.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -echo ===================================== -echo PLM 솔루션 (WACE) - 상태 확인 -echo ===================================== - -echo. -echo 📊 컨테이너 상태 확인 중... -echo. - -docker-compose -f docker-compose.win.yml ps - -echo. -echo 🌐 서비스 접속 정보: -echo • 프론트엔드 (Next.js): http://localhost:3000 -echo • 백엔드 (Spring/JSP): http://localhost:9090 -echo. - -echo 🔧 유용한 명령어: -echo • 로그 확인: docker-compose -f docker-compose.win.yml logs -echo • 실시간 로그: docker-compose -f docker-compose.win.yml logs -f -echo • 특정 서비스 로그: docker-compose -f docker-compose.win.yml logs [plm-app|plm-frontend] -echo. - -echo 💻 개별 서비스 상태 확인: -echo. - -echo [프론트엔드 서비스] -docker-compose -f docker-compose.win.yml ps plm-frontend - -echo. -echo [백엔드 서비스] -docker-compose -f docker-compose.win.yml ps plm-app - -echo. -echo 🌐 브라우저에서 접속하시겠습니까? (Y/N) -set /p choice="선택: " - -if /i "%choice%"=="Y" ( - echo 프론트엔드 페이지를 엽니다... - start http://localhost:3000 -) else if /i "%choice%"=="y" ( - echo 프론트엔드 페이지를 엽니다... - start http://localhost:3000 -) - -echo. -echo 아무 키나 누르면 종료됩니다... -pause >nul \ No newline at end of file diff --git a/stop-all-linux.sh b/stop-all-linux.sh deleted file mode 100644 index 545491f1..00000000 --- a/stop-all-linux.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -echo "============================================" -echo "PLM 솔루션 - 전체 서비스 중지 - Linux" -echo "============================================" - -echo "" -echo "🛑 모든 서비스를 중지합니다..." -echo "" - -# 프론트엔드 먼저 중지 -echo "1. 프론트엔드 서비스 중지 중..." -docker-compose -f docker-compose.frontend.linux.yml down -v - -echo "" -echo "2. 백엔드 서비스 중지 중..." -docker-compose -f docker-compose.backend.linux.yml down -v - -echo "" -echo "3. Docker 네트워크 정리 중..." -docker network rm pms-network 2>/dev/null || echo "네트워크가 이미 제거되었거나 사용 중입니다." - -echo "" -echo "4. 사용하지 않는 리소스 정리 중..." -docker system prune -f - -echo "" -echo "============================================" -echo "✅ 모든 서비스가 중지되었습니다!" -echo "============================================" -echo "" -echo "정리된 항목:" -echo " ✓ 프론트엔드 컨테이너 (pms-frontend-linux)" -echo " ✓ 백엔드 컨테이너 (pms-backend-linux)" -echo " ✓ Docker 네트워크 (pms-network)" -echo " ✓ 사용하지 않는 이미지 및 볼륨" -echo "" -echo "🔄 서비스 재시작: ./start-all-separated-linux.sh" -echo "" -echo "============================================" - -read -p "계속하려면 Enter 키를 누르세요..." \ No newline at end of file diff --git a/stop-all-separated.bat b/stop-all-separated.bat deleted file mode 100644 index f28bef1f..00000000 --- a/stop-all-separated.bat +++ /dev/null @@ -1,56 +0,0 @@ -@echo off -chcp 65001 >nul - -echo ============================================ -echo PLM 솔루션 - 전체 서비스 중지 (분리형) -echo ============================================ - -echo. -echo 🛑 백엔드와 프론트엔드 서비스를 순차적으로 중지합니다... -echo. - -REM 프론트엔드 먼저 중지 -echo ============================================ -echo 1. 프론트엔드 서비스 중지 중... -echo ============================================ - -docker-compose -f docker-compose.frontend.win.yml down -v - -echo. -echo ⏳ 프론트엔드 서비스 완전 중지 대기 중... (5초) -timeout /t 5 /nobreak >nul - -REM 백엔드 중지 -echo. -echo ============================================ -echo 2. 백엔드 서비스 중지 중... -echo ============================================ - -docker-compose -f docker-compose.backend.win.yml down -v - -echo. -echo ⏳ 백엔드 서비스 완전 중지 대기 중... (5초) -timeout /t 5 /nobreak >nul - -REM 네트워크 정리 (선택사항) -echo. -echo ============================================ -echo 3. 네트워크 정리 중... -echo ============================================ - -docker network rm pms-network 2>nul || echo 네트워크가 이미 삭제되었습니다. - -echo. -echo ============================================ -echo ✅ 모든 서비스가 중지되었습니다! -echo ============================================ -echo. -echo 서비스 상태 확인: -echo docker ps -echo. -echo 서비스 시작: -echo start-all-separated.bat -echo. -echo ============================================ - -pause diff --git a/stop-all.sh b/stop-all.sh deleted file mode 100644 index 0dc8d02d..00000000 --- a/stop-all.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -echo "============================================" -echo "PLM 솔루션 - 전체 서비스 중지" -echo "============================================" - -echo "" -echo "🛑 모든 서비스를 중지합니다..." -echo "" - -echo "1. 프론트엔드 서비스 중지 중..." -docker-compose -f docker-compose.frontend.mac.yml down -v - -echo "" -echo "2. 백엔드 서비스 중지 중..." -docker-compose -f docker-compose.backend.mac.yml down -v - -echo "" -echo "3. Docker 네트워크 정리 중..." -docker network rm pms-network 2>/dev/null || echo "네트워크가 이미 제거되었거나 사용 중입니다." - -echo "" -echo "============================================" -echo "✅ 모든 서비스가 중지되었습니다!" -echo "============================================" -echo "" -echo "컨테이너 상태 확인: docker ps -a" -echo "이미지 정리하기: docker system prune -f" -echo "" -echo "============================================" - -read -p "계속하려면 아무 키나 누르세요..." \ No newline at end of file diff --git a/stop-windows.bat b/stop-windows.bat deleted file mode 100644 index 6b281ff1..00000000 --- a/stop-windows.bat +++ /dev/null @@ -1,33 +0,0 @@ -@echo off - -echo ===================================== -echo PLM 솔루션 - Windows 정지 -echo ===================================== - -echo PLM 서비스 정지 중... -echo • 프론트엔드 (Next.js) 정지 -echo • 백엔드 (Spring/JSP) 정지 -echo • 볼륨 및 네트워크 정리 - -docker-compose -f docker-compose.win.yml down --volumes --remove-orphans - -if %errorlevel% equ 0 ( - echo. - echo ✅ PLM 서비스가 성공적으로 정지되었습니다. - echo. - echo 📋 정리 완료: - echo • 모든 컨테이너 정지 및 제거 - echo • 볼륨 데이터 정리 - echo • 네트워크 정리 - echo. -) else ( - echo. - echo ❌ PLM 서비스 정지 중 오류가 발생했습니다. - echo. - echo 🔍 수동으로 정리하려면: - echo docker-compose -f docker-compose.win.yml down --volumes - echo. -) - -echo 작업 완료. 아무 키나 누르면 종료됩니다... -pause >nul \ No newline at end of file