설정 파일 커밋밋
This commit is contained in:
93
.classpath
93
.classpath
@@ -1,96 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aopalliance-1.0.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aspectjrt-1.8.4.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aspectjweaver-1.8.4.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/cglib-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-beanutils-1.9.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-codec-1.9.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-collections-3.2.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-digester-1.8.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-httpclient-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-io-2.2.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-lang3-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.1.3.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-net-3.3.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/cos.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/egovframework.rte.ptl.mvc-3.1.0.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/external-debug.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ezmorph-1.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/fontbox-2.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/gson-2.3.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/INICrypto_v3.1.6_signed.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/IntegratedCadServer.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-core-asl-1.9.13.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/json-lib-2.2.2-jdk15.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/json-lib-ext-spring-1.0.2.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/json-simple-1.1.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jstl-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jxl.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.17.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4jdbc-remix-0.2.7.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mail.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mybatis-3.2.3.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mybatis-spring-1.2.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/NETSSSOScriptAgent.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/nls-debug.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ojdbc5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/pdfbox-2.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/poi-3.11.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/poi-ooxml-3.11.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/poi-ooxml-schemas-3.11.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/scsl.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-api-1.7.7.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-log4j12-1.7.7.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-aop-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-beans-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-context-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-core-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-expression-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-jdbc-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-oxm-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-test-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-tx-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-web-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-webmvc-3.2.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-ws-core-2.1.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-xml-2.1.4.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/stax-api-1.0-2.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-api-3.0.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-autotag-core-runtime-1.1.0.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-core-3.0.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-el-3.0.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-extras-3.0.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-jsp-3.0.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-request-api-1.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-request-jsp-1.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-request-servlet-1.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-request-servlet-wildcard-1.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-servlet-3.0.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tiles-template-3.0.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/wsdl4j-1.6.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xercesImpl-2.11.0.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xml-apis-1.4.01.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xmlbeans-2.6.0.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xmlpull-1.1.3.1.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xpp3_min-1.1.4c.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xstream-1.4.5.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/postgresql-42.2.16.jre7.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jsoup-1.14.3-sources.jar"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jsoup-1.14.3.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/woosung">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="jst.web"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib"/>
|
||||
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
@@ -1,29 +1,22 @@
|
||||
# PLM WACE 운영환경 설정
|
||||
# App Service Configuration
|
||||
# Note: These keys (DB_URL, DB_USER, DB_PASSWORD) might need adjustment
|
||||
# based on how the actual Java application reads them (e.g., from System.getenv()).
|
||||
# The JNDI approach suggested earlier might ignore these direct env vars.
|
||||
# DB_URL=jdbc:postgresql://plm-ilshin-db:5432/ilshin
|
||||
# DB_USER=postgres
|
||||
# DB_PASSWORD=ilshin0909!!
|
||||
|
||||
# 애플리케이션 환경
|
||||
NODE_ENV=production
|
||||
|
||||
# 데이터베이스 설정
|
||||
DB_URL=jdbc:postgresql://localhost:5432/waceplm
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=waceplm0909!!
|
||||
|
||||
# PostgreSQL 환경 변수
|
||||
# DB Service Configuration
|
||||
POSTGRES_DB=waceplm
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=waceplm0909!!
|
||||
|
||||
# JVM 옵션 (운영환경용)
|
||||
JAVA_OPTS=-Xms1024m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m
|
||||
|
||||
# 로그 레벨
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# 개발 모드 플래그
|
||||
DEBUG=false
|
||||
|
||||
# SSL 설정
|
||||
SSL_ENABLED=true
|
||||
|
||||
# 도메인 설정
|
||||
DOMAIN=waceplm.esgrin.com
|
||||
# You can add other environment-specific variables here
|
||||
# Example: TOMCAT_JAVA_OPTS="-Xmx512m -Xms256m"
|
||||
DB_URL=jdbc:postgresql://wace-plm-db:5432/waceplm
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=waceplm0909!!
|
||||
DB_DRIVER_CLASS_NAME=org.postgresql.Driver
|
||||
DB_MAX_TOTAL=200
|
||||
DB_MAX_IDLE=50
|
||||
DB_MAX_WAIT_MILLIS=-1
|
||||
67
.gitignore
vendored
67
.gitignore
vendored
@@ -1,67 +0,0 @@
|
||||
# 환경 설정 파일
|
||||
.env.*
|
||||
!.env.*.example
|
||||
!.env.production
|
||||
|
||||
# 로그 파일
|
||||
logs/
|
||||
*.log
|
||||
|
||||
# 백업 파일
|
||||
backup_*.sql
|
||||
*.bak
|
||||
|
||||
# IDE 설정
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# OS 생성 파일
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# 빌드 결과물
|
||||
target/
|
||||
build/
|
||||
dist/
|
||||
|
||||
# 임시 파일
|
||||
*.tmp
|
||||
*.temp
|
||||
|
||||
# Docker 볼륨 데이터
|
||||
postgres_data/
|
||||
|
||||
# 컴파일된 클래스 파일
|
||||
*.class
|
||||
|
||||
# 패키지 파일
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# Maven
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
|
||||
# 대용량 파일 (필요시 Git LFS 사용)
|
||||
# db/dbexport.pgsql
|
||||
|
||||
# 쿠키 파일
|
||||
cookies.txt
|
||||
|
||||
# 압축 파일
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# 문서 임시 파일
|
||||
~$*
|
||||
|
||||
# SVN 파일들
|
||||
.svn/
|
||||
23
.project
23
.project
@@ -1,41 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>samduck</name>
|
||||
<name>wace-plm</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1756446253951</id>
|
||||
<id>1754642369857</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
# WACE PLM 데이터베이스 초기화 가이드
|
||||
|
||||
## 개요
|
||||
|
||||
WACE PLM 시스템의 데이터베이스를 초기화하는 방법을 설명합니다. `db/dbexport.pgsql` 파일을 사용하여 PostgreSQL 데이터베이스에 초기 데이터를 임포트할 수 있습니다.
|
||||
|
||||
## 방법 1: 독립실행환경 (Standalone) - 권장
|
||||
|
||||
로컬 PostgreSQL 컨테이너를 포함한 완전한 독립실행환경입니다. 데이터베이스가 자동으로 초기화됩니다.
|
||||
|
||||
### 사용법
|
||||
|
||||
```bash
|
||||
# 독립실행환경으로 시작 (로컬 DB 포함)
|
||||
./start-docker-linux.sh -e standalone
|
||||
|
||||
# 또는 Docker 정리 후 시작
|
||||
./start-docker-linux.sh -e standalone -c
|
||||
```
|
||||
|
||||
### 특징
|
||||
|
||||
- 로컬 PostgreSQL 컨테이너 자동 생성
|
||||
- `dbexport.pgsql` 파일 자동 임포트
|
||||
- 외부 데이터베이스 의존성 없음
|
||||
- 접속 정보:
|
||||
- 애플리케이션: http://localhost:8090
|
||||
- 데이터베이스: localhost:5432
|
||||
- 사용자: postgres
|
||||
- 비밀번호: waceplm0909!!
|
||||
|
||||
## 방법 2: 기존 환경에서 데이터베이스 초기화
|
||||
|
||||
기존 개발환경이나 운영환경에서 외부 데이터베이스에 초기 데이터를 임포트합니다.
|
||||
|
||||
### 사용법
|
||||
|
||||
```bash
|
||||
# 개발환경 데이터베이스 초기화
|
||||
./start-docker-linux.sh -e dev -i
|
||||
|
||||
# 운영환경 데이터베이스 초기화
|
||||
./start-docker-linux.sh -e prod -i
|
||||
|
||||
# 데이터베이스 초기화만 실행 (컨테이너 시작 안함)
|
||||
./start-docker-linux.sh -i
|
||||
```
|
||||
|
||||
### 특징
|
||||
|
||||
- 기존 데이터 자동 백업 생성
|
||||
- 연결 테스트 후 임포트 실행
|
||||
- 임포트 결과 검증
|
||||
- Docker를 사용한 안전한 임포트
|
||||
|
||||
## 방법 3: 수동 스크립트 사용
|
||||
|
||||
### PostgreSQL 클라이언트 직접 사용
|
||||
|
||||
```bash
|
||||
# 기본 설정으로 초기화
|
||||
./init-db.sh
|
||||
|
||||
# 사용자 정의 설정으로 초기화
|
||||
./init-db.sh dev 211.115.91.141 11132 waceplm postgres waceplm0909!!
|
||||
```
|
||||
|
||||
### Docker를 사용한 초기화
|
||||
|
||||
```bash
|
||||
# 기본 설정으로 초기화
|
||||
./init-db-docker.sh
|
||||
|
||||
# 사용자 정의 설정으로 초기화
|
||||
./init-db-docker.sh 211.115.91.141 11132 waceplm postgres waceplm0909!!
|
||||
```
|
||||
|
||||
## 파일 구조
|
||||
|
||||
```
|
||||
db/
|
||||
├── 00-create-roles.sh # 데이터베이스 역할 생성 스크립트
|
||||
└── dbexport.pgsql # 데이터베이스 덤프 파일 (200MB+)
|
||||
|
||||
# 새로 추가된 파일들
|
||||
├── docker-compose.standalone.yml # 독립실행환경 설정
|
||||
├── init-db.sh # 수동 DB 초기화 스크립트
|
||||
├── init-db-docker.sh # Docker 기반 DB 초기화 스크립트
|
||||
└── start-docker-linux.sh # 통합 실행 스크립트 (업데이트됨)
|
||||
```
|
||||
|
||||
## 환경별 설정
|
||||
|
||||
### 개발환경 (dev)
|
||||
- Docker Compose: `docker-compose.dev.yml`
|
||||
- 환경 변수: `.env.development`
|
||||
- 외부 DB: 211.115.91.141:11132
|
||||
|
||||
### 운영환경 (prod)
|
||||
- Docker Compose: `docker-compose.prod.yml`
|
||||
- 환경 변수: `.env.production`
|
||||
- 외부 DB: 설정에 따라
|
||||
|
||||
### 독립실행환경 (standalone)
|
||||
- Docker Compose: `docker-compose.standalone.yml`
|
||||
- 로컬 PostgreSQL 컨테이너 사용
|
||||
- 자동 DB 초기화
|
||||
|
||||
## 주의사항
|
||||
|
||||
1. **대용량 파일**: `dbexport.pgsql` 파일이 200MB 이상이므로 임포트에 시간이 걸릴 수 있습니다.
|
||||
|
||||
2. **백업**: 기존 데이터가 있는 경우 자동으로 백업이 생성됩니다.
|
||||
- 백업 파일명: `backup_YYYYMMDD_HHMMSS.sql`
|
||||
|
||||
3. **권한**: 스크립트 실행 전 권한을 확인하세요.
|
||||
```bash
|
||||
chmod +x *.sh
|
||||
```
|
||||
|
||||
4. **연결 테스트**: 임포트 전에 데이터베이스 연결을 테스트합니다.
|
||||
|
||||
5. **에러 처리**: 임포트 실패 시 백업 파일을 사용하여 복원할 수 있습니다.
|
||||
|
||||
## 트러블슈팅
|
||||
|
||||
### 연결 실패
|
||||
```bash
|
||||
# 데이터베이스 서비스 상태 확인
|
||||
docker ps | grep postgres
|
||||
|
||||
# 네트워크 연결 확인
|
||||
telnet [DB_HOST] [DB_PORT]
|
||||
```
|
||||
|
||||
### 임포트 실패
|
||||
```bash
|
||||
# 로그 확인
|
||||
./start-docker-linux.sh -l
|
||||
|
||||
# 수동 복원
|
||||
psql -h [HOST] -p [PORT] -U [USER] -d [DB] < backup_YYYYMMDD_HHMMSS.sql
|
||||
```
|
||||
|
||||
### 권한 문제
|
||||
```bash
|
||||
# 스크립트 권한 확인
|
||||
ls -la *.sh
|
||||
|
||||
# 권한 부여
|
||||
chmod +x *.sh
|
||||
```
|
||||
|
||||
## 예시 사용 시나리오
|
||||
|
||||
### 최초 설치 시
|
||||
```bash
|
||||
# 1. 독립실행환경으로 시작 (권장)
|
||||
./start-docker-linux.sh -e standalone
|
||||
|
||||
# 2. 또는 개발환경에서 DB 초기화 후 시작
|
||||
./start-docker-linux.sh -e dev -i
|
||||
```
|
||||
|
||||
### 데이터 리셋 시
|
||||
```bash
|
||||
# 1. 컨테이너 중지
|
||||
./start-docker-linux.sh -s
|
||||
|
||||
# 2. Docker 정리 후 재시작
|
||||
./start-docker-linux.sh -e standalone -c
|
||||
```
|
||||
|
||||
### 운영환경 배포 시
|
||||
```bash
|
||||
# 1. 데이터베이스 초기화
|
||||
./start-docker-linux.sh -e prod -i
|
||||
|
||||
# 2. 애플리케이션 시작
|
||||
./start-docker-linux.sh -e prod
|
||||
```
|
||||
|
||||
이 가이드를 통해 WACE PLM 시스템의 데이터베이스를 안전하고 효율적으로 초기화할 수 있습니다.
|
||||
@@ -8,7 +8,7 @@ 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 ./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/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# PLM 솔루션 (WACE PLM)
|
||||
# PLM 솔루션 (ILSHIN)
|
||||
|
||||
## 프로젝트 개요
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
이 프로젝트는 제공된 `Dockerfile` 및 `docker-compose.yml` 파일을 사용하여 Docker 컨테이너 환경에서 실행할 수 있습니다.
|
||||
|
||||
1. **Docker 및 Docker Compose 설치:** 시스템에 Docker와 Docker Compose가 설치되어 있어야 합니다.
|
||||
2. **데이터베이스 파일 준비:** `waceplm.pgsql` 파일이 프로젝트 루트 디렉토리에 있는지 확인합니다. (필요시 `docker-compose.yml`에서 파일 경로 수정)
|
||||
2. **데이터베이스 파일 준비:** `ilshin.pgsql` 파일이 프로젝트 루트 디렉토리에 있는지 확인합니다. (필요시 `docker-compose.yml`에서 파일 경로 수정)
|
||||
3. **Docker Compose 실행:** 프로젝트 루트 디렉토리에서 다음 명령어를 실행합니다.
|
||||
```bash
|
||||
docker-compose up --build -d
|
||||
@@ -77,4 +77,4 @@
|
||||
**참고:**
|
||||
|
||||
- 애플리케이션이 데이터베이스 연결 정보를 읽는 방식 (예: JNDI, 환경 변수, 설정 파일)에 따라 `docker-compose.yml`의 `app` 서비스 환경 변수 또는 Tomcat 설정 파일 (`context.xml` 등) 수정이 필요할 수 있습니다.
|
||||
- `SETTING_GUIDE.txt`에 명시된 Tomcat 컨텍스트 경로 (`/waceplm`)를 사용하려면 `Dockerfile`에서 `WebContent`를 `/usr/local/tomcat/webapps/waceplm`로 복사하거나 Tomcat 설정을 변경해야 할 수 있습니다. 현재 설정은 `/` (ROOT) 경로로 배포됩니다.
|
||||
- `SETTING_GUIDE.txt`에 명시된 Tomcat 컨텍스트 경로 (`/ilshin`)를 사용하려면 `Dockerfile`에서 `WebContent`를 `/usr/local/tomcat/webapps/ilshin`로 복사하거나 Tomcat 설정을 변경해야 할 수 있습니다. 현재 설정은 `/` (ROOT) 경로로 배포됩니다.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<Context docBase="woosung" path="/" reloadable="true" source="org.eclipse.jst.jee.server:woosung">
|
||||
<Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="100" maxIdle="10" maxWait="-1" name="plm" password="admin0909!!" type="javax.sql.DataSource" url="jdbc:postgresql://211.224.136.4:5432/woosung" username="postgres"/>
|
||||
<Context docBase="ilshin" path="/" reloadable="true" source="org.eclipse.jst.jee.server:ilshin">
|
||||
<Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="100" maxIdle="10" maxWait="-1" name="plm" password="admin0909!!" type="javax.sql.DataSource" url="jdbc:postgresql://211.224.136.4:5432/ilshin" username="postgres"/>
|
||||
</Context>
|
||||
BIN
WebContent/WEB-INF/lib/INICrypto_v3.1.6_signed.jar
Normal file
BIN
WebContent/WEB-INF/lib/INICrypto_v3.1.6_signed.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/IntegratedCadServer.jar
Normal file
BIN
WebContent/WEB-INF/lib/IntegratedCadServer.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/NETSSSOScriptAgent.jar
Normal file
BIN
WebContent/WEB-INF/lib/NETSSSOScriptAgent.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/aopalliance-1.0.jar
Normal file
BIN
WebContent/WEB-INF/lib/aopalliance-1.0.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/aspectjrt-1.8.4.jar
Normal file
BIN
WebContent/WEB-INF/lib/aspectjrt-1.8.4.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/aspectjweaver-1.8.4.jar
Normal file
BIN
WebContent/WEB-INF/lib/aspectjweaver-1.8.4.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/cglib-3.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/cglib-3.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-beanutils-1.9.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-beanutils-1.9.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-codec-1.9.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-codec-1.9.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-collections-3.2.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-collections-3.2.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-digester-1.8.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-digester-1.8.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-httpclient-3.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-httpclient-3.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-io-2.2.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-io-2.2.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-io-2.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-io-2.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-lang3-3.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-lang3-3.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-logging-1.1.3.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-logging-1.1.3.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/commons-net-3.3.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-net-3.3.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/cos.jar
Normal file
BIN
WebContent/WEB-INF/lib/cos.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/egovframework.rte.ptl.mvc-3.1.0.jar
Normal file
BIN
WebContent/WEB-INF/lib/egovframework.rte.ptl.mvc-3.1.0.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/external-debug.jar
Normal file
BIN
WebContent/WEB-INF/lib/external-debug.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/ezmorph-1.0.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/ezmorph-1.0.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/fontbox-2.0.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/fontbox-2.0.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/gson-2.3.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/gson-2.3.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/httpclient-4.5.13.jar
Normal file
BIN
WebContent/WEB-INF/lib/httpclient-4.5.13.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/httpcore-4.4.13.jar
Normal file
BIN
WebContent/WEB-INF/lib/httpcore-4.4.13.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/jackson-core-asl-1.9.13.jar
Normal file
BIN
WebContent/WEB-INF/lib/jackson-core-asl-1.9.13.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar
Normal file
BIN
WebContent/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/json-lib-2.2.2-jdk15.jar
Normal file
BIN
WebContent/WEB-INF/lib/json-lib-2.2.2-jdk15.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/json-lib-ext-spring-1.0.2.jar
Normal file
BIN
WebContent/WEB-INF/lib/json-lib-ext-spring-1.0.2.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/json-simple-1.1.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/json-simple-1.1.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/jsoup-1.14.3-sources.jar
Normal file
BIN
WebContent/WEB-INF/lib/jsoup-1.14.3-sources.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/jsoup-1.14.3.jar
Normal file
BIN
WebContent/WEB-INF/lib/jsoup-1.14.3.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/jstl-1.2.jar
Normal file
BIN
WebContent/WEB-INF/lib/jstl-1.2.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/jxl.jar
Normal file
BIN
WebContent/WEB-INF/lib/jxl.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/log4j-1.2.17.jar
Normal file
BIN
WebContent/WEB-INF/lib/log4j-1.2.17.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/log4jdbc-remix-0.2.7.jar
Normal file
BIN
WebContent/WEB-INF/lib/log4jdbc-remix-0.2.7.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/mail.jar
Normal file
BIN
WebContent/WEB-INF/lib/mail.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/mybatis-3.2.3.jar
Normal file
BIN
WebContent/WEB-INF/lib/mybatis-3.2.3.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/mybatis-spring-1.2.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/mybatis-spring-1.2.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/nls-debug.jar
Normal file
BIN
WebContent/WEB-INF/lib/nls-debug.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/ojdbc5.jar
Normal file
BIN
WebContent/WEB-INF/lib/ojdbc5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/pdfbox-2.0.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/pdfbox-2.0.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/poi-3.11.jar
Normal file
BIN
WebContent/WEB-INF/lib/poi-3.11.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/poi-ooxml-3.11.jar
Normal file
BIN
WebContent/WEB-INF/lib/poi-ooxml-3.11.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/poi-ooxml-schemas-3.11.jar
Normal file
BIN
WebContent/WEB-INF/lib/poi-ooxml-schemas-3.11.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/postgresql-42.2.16.jre7.jar
Normal file
BIN
WebContent/WEB-INF/lib/postgresql-42.2.16.jre7.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/scsl.jar
Normal file
BIN
WebContent/WEB-INF/lib/scsl.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/slf4j-api-1.7.7.jar
Normal file
BIN
WebContent/WEB-INF/lib/slf4j-api-1.7.7.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/slf4j-log4j12-1.7.7.jar
Normal file
BIN
WebContent/WEB-INF/lib/slf4j-log4j12-1.7.7.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-aop-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-aop-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-beans-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-beans-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-context-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-context-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-core-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-core-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-expression-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-expression-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-jdbc-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-jdbc-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-oxm-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-oxm-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-test-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-test-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-tx-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-tx-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-web-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-web-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-webmvc-3.2.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-webmvc-3.2.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-ws-core-2.1.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-ws-core-2.1.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/spring-xml-2.1.4.RELEASE.jar
Normal file
BIN
WebContent/WEB-INF/lib/spring-xml-2.1.4.RELEASE.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/stax-api-1.0-2.jar
Normal file
BIN
WebContent/WEB-INF/lib/stax-api-1.0-2.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tibero6-jdbc.jar
Normal file
BIN
WebContent/WEB-INF/lib/tibero6-jdbc.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-api-3.0.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-api-3.0.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-autotag-core-runtime-1.1.0.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-autotag-core-runtime-1.1.0.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-core-3.0.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-core-3.0.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-el-3.0.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-el-3.0.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-extras-3.0.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-extras-3.0.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-jsp-3.0.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-jsp-3.0.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-request-api-1.0.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-request-api-1.0.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-request-jsp-1.0.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-request-jsp-1.0.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-request-servlet-1.0.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-request-servlet-1.0.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-request-servlet-wildcard-1.0.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-request-servlet-wildcard-1.0.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-servlet-3.0.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-servlet-3.0.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/tiles-template-3.0.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/tiles-template-3.0.5.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/wsdl4j-1.6.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/wsdl4j-1.6.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xercesImpl-2.11.0.jar
Normal file
BIN
WebContent/WEB-INF/lib/xercesImpl-2.11.0.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xml-apis-1.4.01.jar
Normal file
BIN
WebContent/WEB-INF/lib/xml-apis-1.4.01.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xmlbeans-2.6.0.jar
Normal file
BIN
WebContent/WEB-INF/lib/xmlbeans-2.6.0.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xmlpull-1.1.3.1.jar
Normal file
BIN
WebContent/WEB-INF/lib/xmlpull-1.1.3.1.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xpp3_min-1.1.4c.jar
Normal file
BIN
WebContent/WEB-INF/lib/xpp3_min-1.1.4c.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xstream-1.4.5.jar
Normal file
BIN
WebContent/WEB-INF/lib/xstream-1.4.5.jar
Normal file
Binary file not shown.
5
cookies.txt
Normal file
5
cookies.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
# Netscape HTTP Cookie File
|
||||
# https://curl.se/docs/http-cookies.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
|
||||
#HttpOnly_localhost FALSE / FALSE 0 JSESSIONID 99DCC3F6CD4594878206E184A83A6A58
|
||||
BIN
db/.DS_Store
vendored
Normal file
BIN
db/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -1,63 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
wace-plm:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
container_name: wace-plm-standalone
|
||||
ports:
|
||||
- "8090:8080"
|
||||
environment:
|
||||
CATALINA_OPTS: >-
|
||||
-DDB_URL=jdbc:postgresql://wace-plm-db:5432/waceplm
|
||||
-DDB_USERNAME=postgres
|
||||
-DDB_PASSWORD=waceplm0909!!
|
||||
-Xms512m
|
||||
-Xmx1024m
|
||||
volumes:
|
||||
- wace-plm-project_data:/data_storage
|
||||
- wace-plm-app_data:/path/inside/container
|
||||
- ./logs:/usr/local/tomcat/logs
|
||||
- ./WebContent:/usr/local/tomcat/webapps/ROOT
|
||||
depends_on:
|
||||
wace-plm-db:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- wace-plm-network
|
||||
|
||||
wace-plm-db:
|
||||
image: postgres:16-alpine
|
||||
container_name: wace-plm-db-standalone
|
||||
environment:
|
||||
POSTGRES_DB: waceplm
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: waceplm0909!!
|
||||
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./db/00-create-roles.sh:/docker-entrypoint-initdb.d/00-create-roles.sh
|
||||
- ./db/dbexport.pgsql:/docker-entrypoint-initdb.d/01-dbexport.sql
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d waceplm"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- wace-plm-network
|
||||
|
||||
volumes:
|
||||
wace-plm-project_data:
|
||||
driver: local
|
||||
wace-plm-app_data:
|
||||
driver: local
|
||||
postgres_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
wace-plm-network:
|
||||
driver: bridge
|
||||
@@ -1,17 +1,17 @@
|
||||
# PLM WACE 개발환경 설정
|
||||
# PLM ILSHIN 개발환경 설정
|
||||
|
||||
# 애플리케이션 환경
|
||||
NODE_ENV=development
|
||||
|
||||
# 데이터베이스 설정
|
||||
DB_URL=jdbc:postgresql://211.115.91.141:11133/waceplm
|
||||
DB_URL=jdbc:postgresql://211.115.91.141:11132/ilshin
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=waceplm0909!!
|
||||
DB_PASSWORD=ilshin0909!!
|
||||
|
||||
# PostgreSQL 환경 변수 (내부 DB 사용 시)
|
||||
POSTGRES_DB=waceplm
|
||||
POSTGRES_DB=ilshin
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=waceplm0909!!
|
||||
POSTGRES_PASSWORD=ilshin0909!!
|
||||
|
||||
# 애플리케이션 포트
|
||||
APP_PORT=8090
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# PLM WACE 운영환경 설정
|
||||
# PLM ILSHIN 운영환경 설정
|
||||
|
||||
# 애플리케이션 환경
|
||||
NODE_ENV=production
|
||||
|
||||
# 데이터베이스 설정
|
||||
DB_URL=jdbc:postgresql://localhost:5432/waceplm
|
||||
DB_URL=jdbc:postgresql://localhost:5432/ilshin
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=waceplm0909!!
|
||||
DB_PASSWORD=your_production_password
|
||||
|
||||
# PostgreSQL 환경 변수
|
||||
POSTGRES_DB=waceplm
|
||||
POSTGRES_DB=ilshin
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=waceplm0909!!
|
||||
POSTGRES_PASSWORD=your_production_password
|
||||
|
||||
# JVM 옵션 (운영환경용)
|
||||
JAVA_OPTS=-Xms1024m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m
|
||||
@@ -26,4 +26,5 @@ DEBUG=false
|
||||
SSL_ENABLED=true
|
||||
|
||||
# 도메인 설정
|
||||
DOMAIN=waceplm.esgrin.com
|
||||
DOMAIN=ilshin.esgrin.com
|
||||
ALT_DOMAIN=autoclave.co.kr
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Docker를 사용한 데이터베이스 초기화 스크립트
|
||||
# 사용법: ./init-db-docker.sh [DB_HOST] [DB_PORT] [DB_NAME] [DB_USER] [DB_PASSWORD]
|
||||
|
||||
set -e
|
||||
|
||||
# 기본값 설정
|
||||
DB_HOST=${1:-"211.115.91.141"}
|
||||
DB_PORT=${2:-"11132"}
|
||||
DB_NAME=${3:-"waceplm"}
|
||||
DB_USER=${4:-"postgres"}
|
||||
DB_PASSWORD=${5:-"waceplm0909!!"}
|
||||
|
||||
echo "=== Docker를 사용한 WACE PLM 데이터베이스 초기화 ==="
|
||||
echo "DB 호스트: $DB_HOST"
|
||||
echo "DB 포트: $DB_PORT"
|
||||
echo "DB 이름: $DB_NAME"
|
||||
echo "DB 사용자: $DB_USER"
|
||||
echo "=================================================="
|
||||
|
||||
# Docker 설치 확인
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "Docker가 설치되어 있지 않습니다."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 현재 디렉토리 확인
|
||||
if [ ! -f "db/dbexport.pgsql" ]; then
|
||||
echo "db/dbexport.pgsql 파일을 찾을 수 없습니다."
|
||||
echo "프로젝트 루트 디렉토리에서 실행해주세요."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# PostgreSQL 클라이언트 컨테이너를 사용하여 연결 테스트
|
||||
echo "데이터베이스 연결 테스트 중..."
|
||||
if ! docker run --rm postgres:16-alpine psql "postgresql://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME" -c "SELECT 1;" > /dev/null 2>&1; then
|
||||
echo "데이터베이스 연결에 실패했습니다."
|
||||
echo "연결 정보를 확인해주세요."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "데이터베이스 연결 성공!"
|
||||
|
||||
# 백업 생성
|
||||
BACKUP_FILE="backup_$(date +%Y%m%d_%H%M%S).sql"
|
||||
echo "기존 데이터 백업 생성 중: $BACKUP_FILE"
|
||||
docker run --rm -v "$(pwd):/workspace" postgres:16-alpine pg_dump "postgresql://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME" > $BACKUP_FILE 2>/dev/null || echo "백업 생성 실패 (기존 데이터가 없을 수 있습니다)"
|
||||
|
||||
# 역할 생성
|
||||
echo "데이터베이스 역할 생성 중..."
|
||||
docker run --rm postgres:16-alpine psql "postgresql://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME" -c "CREATE ROLE IF NOT EXISTS pro_search; CREATE ROLE IF NOT EXISTS search_user;" || echo "역할 생성 실패 (이미 존재할 수 있습니다)"
|
||||
|
||||
# 데이터베이스 임포트
|
||||
echo "데이터베이스 임포트 시작..."
|
||||
echo "파일 크기: $(du -h db/dbexport.pgsql | cut -f1)"
|
||||
echo "대용량 파일 처리 중... (시간이 오래 걸릴 수 있습니다)"
|
||||
|
||||
# Docker 볼륨 마운트를 사용하여 SQL 파일 임포트
|
||||
docker run --rm -v "$(pwd)/db:/db" postgres:16-alpine psql "postgresql://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME" -v ON_ERROR_STOP=1 -f /db/dbexport.pgsql
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "데이터베이스 임포트 완료!"
|
||||
else
|
||||
echo "데이터베이스 임포트 실패!"
|
||||
echo "백업 파일을 사용하여 복원할 수 있습니다: $BACKUP_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 임포트 검증
|
||||
echo "임포트 검증 중..."
|
||||
TABLE_COUNT=$(docker run --rm postgres:16-alpine psql "postgresql://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME" -t -c "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'public';" | tr -d ' ')
|
||||
echo "생성된 테이블 수: $TABLE_COUNT"
|
||||
|
||||
if [ "$TABLE_COUNT" -gt 0 ]; then
|
||||
echo "데이터베이스 초기화가 성공적으로 완료되었습니다!"
|
||||
echo "백업 파일: $BACKUP_FILE"
|
||||
else
|
||||
echo "데이터베이스 초기화에 문제가 있을 수 있습니다."
|
||||
echo "테이블이 생성되지 않았습니다."
|
||||
fi
|
||||
|
||||
echo "=== 초기화 완료 ==="
|
||||
89
init-db.sh
89
init-db.sh
@@ -1,89 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 데이터베이스 초기화 스크립트
|
||||
# 사용법: ./init-db.sh [환경] [DB_HOST] [DB_PORT] [DB_NAME] [DB_USER] [DB_PASSWORD]
|
||||
|
||||
set -e
|
||||
|
||||
# 기본값 설정
|
||||
ENV=${1:-"dev"}
|
||||
DB_HOST=${2:-"211.115.91.141"}
|
||||
DB_PORT=${3:-"11132"}
|
||||
DB_NAME=${4:-"waceplm"}
|
||||
DB_USER=${5:-"postgres"}
|
||||
DB_PASSWORD=${6:-"waceplm0909!!"}
|
||||
|
||||
echo "=== WACE PLM 데이터베이스 초기화 ==="
|
||||
echo "환경: $ENV"
|
||||
echo "DB 호스트: $DB_HOST"
|
||||
echo "DB 포트: $DB_PORT"
|
||||
echo "DB 이름: $DB_NAME"
|
||||
echo "DB 사용자: $DB_USER"
|
||||
echo "=================================="
|
||||
|
||||
# PostgreSQL 클라이언트 설치 확인
|
||||
if ! command -v psql &> /dev/null; then
|
||||
echo "PostgreSQL 클라이언트가 설치되어 있지 않습니다."
|
||||
echo "Ubuntu/Debian: sudo apt-get install postgresql-client"
|
||||
echo "CentOS/RHEL: sudo yum install postgresql"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 데이터베이스 연결 테스트
|
||||
echo "데이터베이스 연결 테스트 중..."
|
||||
export PGPASSWORD=$DB_PASSWORD
|
||||
if ! psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c "SELECT 1;" > /dev/null 2>&1; then
|
||||
echo "데이터베이스 연결에 실패했습니다."
|
||||
echo "연결 정보를 확인해주세요."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "데이터베이스 연결 성공!"
|
||||
|
||||
# 백업 생성 (기존 데이터가 있는 경우)
|
||||
BACKUP_FILE="backup_$(date +%Y%m%d_%H%M%S).sql"
|
||||
echo "기존 데이터 백업 생성 중: $BACKUP_FILE"
|
||||
pg_dump -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME > $BACKUP_FILE 2>/dev/null || echo "백업 생성 실패 (기존 데이터가 없을 수 있습니다)"
|
||||
|
||||
# 역할 생성
|
||||
echo "데이터베이스 역할 생성 중..."
|
||||
if [ -f "db/00-create-roles.sh" ]; then
|
||||
psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c "CREATE ROLE IF NOT EXISTS pro_search; CREATE ROLE IF NOT EXISTS search_user;" || echo "역할 생성 실패 (이미 존재할 수 있습니다)"
|
||||
fi
|
||||
|
||||
# 데이터베이스 임포트
|
||||
echo "데이터베이스 임포트 시작..."
|
||||
if [ -f "db/dbexport.pgsql" ]; then
|
||||
echo "dbexport.pgsql 파일을 임포트합니다..."
|
||||
echo "파일 크기: $(du -h db/dbexport.pgsql | cut -f1)"
|
||||
|
||||
# 대용량 파일 처리를 위한 설정
|
||||
psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -v ON_ERROR_STOP=1 < db/dbexport.pgsql
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "데이터베이스 임포트 완료!"
|
||||
else
|
||||
echo "데이터베이스 임포트 실패!"
|
||||
echo "백업 파일을 사용하여 복원할 수 있습니다: $BACKUP_FILE"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "db/dbexport.pgsql 파일을 찾을 수 없습니다."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 임포트 검증
|
||||
echo "임포트 검증 중..."
|
||||
TABLE_COUNT=$(psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -t -c "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'public';" | tr -d ' ')
|
||||
echo "생성된 테이블 수: $TABLE_COUNT"
|
||||
|
||||
if [ "$TABLE_COUNT" -gt 0 ]; then
|
||||
echo "데이터베이스 초기화가 성공적으로 완료되었습니다!"
|
||||
echo "백업 파일: $BACKUP_FILE"
|
||||
else
|
||||
echo "데이터베이스 초기화에 문제가 있을 수 있습니다."
|
||||
echo "테이블이 생성되지 않았습니다."
|
||||
fi
|
||||
|
||||
unset PGPASSWORD
|
||||
echo "=== 초기화 완료 ==="
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user