-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/#607
- Loading branch information
Showing
77 changed files
with
2,210 additions
and
1,432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
Oops, something went wrong.