Skip to content

Commit

Permalink
Merge branch 'develop' into feat/#607
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee authored Nov 27, 2024
2 parents 901ee99 + a9ad4e5 commit b8aee5d
Show file tree
Hide file tree
Showing 77 changed files with 2,210 additions and 1,432 deletions.
31 changes: 31 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Ignore Git-related files
.git
.gitignore

# Ignore local IDE files
.idea/
*.iml
*.log

# Ignore build directories
build/
out/
target/

# Ignore Docker-related files
Dockerfile
docker-compose.yml

# Ignore other unnecessary files/directories
*.md
*.tmp
*.bak

# Ignore specific directories
cloud/
config/
images/
infra/
jenkins/
monitoring/
nginx/
24 changes: 14 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.5'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
}

Expand All @@ -15,6 +15,10 @@ bootJar {
archivesBaseName = "clab"
archiveFileName = "clab.jar"
archiveVersion = "1.0.0"

layered {
enabled = true
}
}

java {
Expand Down Expand Up @@ -66,35 +70,35 @@ dependencies {
compileOnly 'org.projectlombok:lombok' // 롬복
annotationProcessor 'org.projectlombok:lombok' // 롬복
implementation 'com.google.code.gson:gson:2.11.0' // JSON 라이브러리
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0' // Swagger
implementation 'commons-io:commons-io:2.17.0' // Apache Commons IO
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0' // Swagger
implementation 'commons-io:commons-io:2.18.0' // Apache Commons IO
implementation 'com.google.guava:guava:33.3.1-jre' // Google Core Libraries For Java
implementation 'org.springframework.boot:spring-boot-starter-mail' // Spring Mail
implementation 'com.google.zxing:core:3.4.1' // QR 코드
implementation 'com.google.zxing:javase:3.5.3' // QR 코드
implementation 'org.apache.commons:commons-lang3:3.17.0' // Apache Commons Lang

// MapStruct
implementation 'org.mapstruct:mapstruct:1.6.2'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.2'
implementation 'org.mapstruct:mapstruct:1.6.3'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'

// IPInfo
implementation 'io.ipinfo:ipinfo-spring:0.3.1' // IPInfo Spring
implementation 'io.ipinfo:ipinfo-api:3.0.0' // IPInfo API

// Slack
implementation 'com.slack.api:slack-api-model:1.44.1'
implementation 'com.slack.api:slack-api-client:1.44.1'
implementation 'com.slack.api:slack-app-backend:1.44.1'
implementation 'com.slack.api:slack-api-model:1.44.2'
implementation 'com.slack.api:slack-api-client:1.44.2'
implementation 'com.slack.api:slack-app-backend:1.44.2'

// XSS Filter
implementation 'com.navercorp.lucy:lucy-xss-servlet:2.0.1' // Lucy XSS Servlet Filter
implementation 'com.navercorp.lucy:lucy-xss:1.6.3' // Lucy XSS Filter
implementation 'org.apache.commons:commons-text:1.11.0' // Apache Commons Text

// Image
implementation 'commons-io:commons-io:2.17.0'
implementation 'commons-io:commons-io:2.18.0'
implementation 'com.drewnoakes:metadata-extractor:2.19.0'
implementation 'org.imgscalr:imgscalr-lib:4.2'

Expand All @@ -113,7 +117,7 @@ tasks.named('test') {
def querydslDir = layout.buildDirectory.dir("generated/querydsl").get().asFile

sourceSets {
main.java.srcDirs += [ querydslDir ]
main.java.srcDirs += [querydslDir]
}

tasks.withType(JavaCompile).configureEach {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
38 changes: 29 additions & 9 deletions jenkins/prod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# Use the official OpenJDK 21 image from the Docker Hub
FROM openjdk:21-jdk
# 1. Build Stage
FROM gradle:8.11.1-jdk21 AS build
WORKDIR /app

# Expose port 8080 to the outside world
EXPOSE 8080
# Copy Gradle files and install dependencies
COPY build.gradle settings.gradle /app/
RUN gradle dependencies --stacktrace

# Copy the JAR file into the container
COPY build/libs/clab.jar /clab.jar
# Copy source code and build
COPY src /app/src
RUN gradle bootJar --no-daemon --stacktrace

# Set the default active profile to 'stage'. Modify the 'spring.profiles.active' property to match your environment.
# For example, use '-Dspring.profiles.active=production' for production environment.
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=prod", "/clab.jar"]
# Extract layers from JAR file
RUN java -Djarmode=layertools -jar build/libs/*.jar extract \
&& ls -l /app \
&& ls -l /app/dependencies \
&& ls -l /app/spring-boot-loader \
&& ls -l /app/snapshot-dependencies \
&& ls -l /app/application

# 2. Runtime Stage
FROM eclipse-temurin:21-jre AS runtime
WORKDIR /app

# Copy each layer
COPY --from=build /app/dependencies/ ./
COPY --from=build /app/spring-boot-loader/ ./
COPY --from=build /app/snapshot-dependencies/ ./
COPY --from=build /app/application/ ./

# Run the application
ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "org.springframework.boot.loader.launch.JarLauncher"]
Loading

0 comments on commit b8aee5d

Please sign in to comment.