FITO PLM 프로젝트 설정 및 소스 교체
- DB 연결: 211.115.91.141:11140/fito, postgres/intops0909!! - 도메인: fito.wace.me - 소스 교체 (woosung 기반) - Dockerfile.dev 컴파일 단계 추가 - 로그인 페이지 DH Autoware 스타일 리디자인 - Constants: 회사명 (주)피토/fito, SYSTEM_TITLE FITO PLM - 헤더 로고 FITO 로고로 변경 - 파비콘 추가 - 관리자 팝업 window.open 공백 이슈 수정 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -0,0 +1,26 @@
|
||||
# FITO 개발환경 설정
|
||||
|
||||
# 애플리케이션 환경
|
||||
NODE_ENV=development
|
||||
|
||||
# 데이터베이스 설정
|
||||
DB_URL=jdbc:postgresql://211.115.91.141:11140/fito
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=intops0909!!
|
||||
|
||||
# PostgreSQL 환경 변수 (내부 DB 사용 시)
|
||||
POSTGRES_DB=fito
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=intops0909!!
|
||||
|
||||
# 애플리케이션 포트
|
||||
APP_PORT=8090
|
||||
|
||||
# JVM 옵션
|
||||
JAVA_OPTS=-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
|
||||
|
||||
# 로그 레벨
|
||||
LOG_LEVEL=DEBUG
|
||||
|
||||
# 개발 모드 플래그
|
||||
DEBUG=true
|
||||
@@ -145,8 +145,7 @@ chmod +x start-docker-linux.sh
|
||||
- 데이터베이스: localhost:5432 (내부 DB 사용 시)
|
||||
|
||||
### 운영환경
|
||||
- 애플리케이션: https://ilshin.esgrin.com
|
||||
- 대체 도메인: https://autoclave.co.kr
|
||||
- 애플리케이션: https://fito.wace.me
|
||||
|
||||
## 트러블슈팅
|
||||
|
||||
@@ -234,16 +233,16 @@ docker-compose -f docker-compose.dev.yml down
|
||||
docker exec -it plm-ilshin-container bash
|
||||
|
||||
# 데이터베이스 접근 (내부 DB 사용 시)
|
||||
docker exec -it plm-ilshin-db-container psql -U postgres -d ilshin
|
||||
docker exec -it plm-ilshin-db-container psql -U postgres -d fito
|
||||
```
|
||||
|
||||
### 백업 및 복원
|
||||
```bash
|
||||
# 데이터베이스 백업
|
||||
docker exec plm-ilshin-db-container pg_dump -U postgres ilshin > backup.sql
|
||||
docker exec plm-ilshin-db-container pg_dump -U postgres fito > backup.sql
|
||||
|
||||
# 데이터베이스 복원
|
||||
docker exec -i plm-ilshin-db-container psql -U postgres ilshin < backup.sql
|
||||
docker exec -i plm-ilshin-db-container psql -U postgres fito < backup.sql
|
||||
```
|
||||
|
||||
## 보안 고려사항
|
||||
|
||||
@@ -15,13 +15,13 @@ COPY WebContent ./WebContent
|
||||
# Create classes directory
|
||||
RUN mkdir -p WebContent/WEB-INF/classes
|
||||
|
||||
# Compile Java sources
|
||||
# Compile Java sources (include Tomcat servlet API in classpath)
|
||||
RUN find src -name "*.java" -print0 | xargs -0 javac \
|
||||
-encoding UTF-8 \
|
||||
-source 1.7 \
|
||||
-target 1.7 \
|
||||
-d WebContent/WEB-INF/classes \
|
||||
-cp "WebContent/WEB-INF/lib/*" \
|
||||
-cp "WebContent/WEB-INF/lib/*:/usr/local/tomcat/lib/*" \
|
||||
-Xlint:-options \
|
||||
-Xlint:-deprecation \
|
||||
-Xlint:-unchecked
|
||||
|
||||
@@ -1,10 +1,58 @@
|
||||
FROM dockerhub.wace.me/tomcat:7.0.94-jre7-alpine.arm64 AS Development
|
||||
# Multi-stage build for development
|
||||
# Stage 1: Build stage - compile Java sources
|
||||
FROM dockerhub.wace.me/tomcat:7.0.94-jre7-alpine.arm64 AS builder
|
||||
|
||||
# Install JDK for compilation (JRE image doesn't have javac)
|
||||
RUN apk add --no-cache openjdk7
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /build
|
||||
|
||||
# Copy source code and libraries
|
||||
COPY src ./src
|
||||
COPY WebContent ./WebContent
|
||||
|
||||
# Create classes directory
|
||||
RUN mkdir -p WebContent/WEB-INF/classes
|
||||
|
||||
# Compile Java sources (include Tomcat servlet API in classpath)
|
||||
RUN find src -name "*.java" -print0 | xargs -0 javac \
|
||||
-encoding UTF-8 \
|
||||
-source 1.7 \
|
||||
-target 1.7 \
|
||||
-d WebContent/WEB-INF/classes \
|
||||
-cp "WebContent/WEB-INF/lib/*:/usr/local/tomcat/lib/*" \
|
||||
-Xlint:-options \
|
||||
-Xlint:-deprecation \
|
||||
-Xlint:-unchecked
|
||||
|
||||
# Copy resources (XML, properties files)
|
||||
RUN find src -type f \( -name "*.xml" -o -name "*.properties" \) | while read -r filepath; do \
|
||||
relative_path="${filepath#src/}"; \
|
||||
target_file="WebContent/WEB-INF/classes/$relative_path"; \
|
||||
mkdir -p "$(dirname "$target_file")"; \
|
||||
cp "$filepath" "$target_file"; \
|
||||
done
|
||||
|
||||
# Verify compilation
|
||||
RUN CLASS_COUNT=$(find WebContent/WEB-INF/classes -name "*.class" | wc -l); \
|
||||
if [ $CLASS_COUNT -eq 0 ]; then \
|
||||
echo "ERROR: No Java classes were compiled!"; \
|
||||
exit 1; \
|
||||
else \
|
||||
echo "Successfully compiled $CLASS_COUNT Java classes"; \
|
||||
fi
|
||||
|
||||
# Stage 2: Runtime stage
|
||||
FROM dockerhub.wace.me/tomcat:7.0.94-jre7-alpine.arm64 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 compiled application from builder stage
|
||||
COPY --from=builder /build/WebContent /usr/local/tomcat/webapps/ROOT
|
||||
|
||||
# Copy source for reference
|
||||
COPY src /usr/local/tomcat/webapps/ROOT/WEB-INF/src
|
||||
|
||||
# Copy custom Tomcat context configuration for JNDI
|
||||
@@ -13,11 +61,8 @@ COPY ./tomcat-conf/context.xml /usr/local/tomcat/conf/context.xml
|
||||
# Configure Tomcat Connector for UTF-8 URI encoding
|
||||
RUN sed -i 's/<Connector port="8080"/<Connector port="8080" URIEncoding="UTF-8"/g' /usr/local/tomcat/conf/server.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"]
|
||||
CMD ["catalina.sh", "run"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<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 docBase="fito" path="/" reloadable="true" source="org.eclipse.jst.jee.server:fito">
|
||||
<Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="100" maxIdle="10" maxWait="-1" name="plm" password="intops0909!!" type="javax.sql.DataSource" url="jdbc:postgresql://211.115.91.141:11140/fito" username="postgres"/>
|
||||
</Context>
|
||||
|
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 103 B |
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 56 B After Width: | Height: | Size: 56 B |
|
Before Width: | Height: | Size: 941 B After Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
|
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 718 B |
|
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 553 B |
|
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 553 B |
|
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |