Skip to content

Commit

Permalink
add: fifx build
Browse files Browse the repository at this point in the history
  • Loading branch information
kochetkov-ma committed Jul 1, 2024
1 parent 52343ca commit 38d8ac6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules/
.helm/
.github/
build/
.idea/
.gradle/
tmp/
tmp/
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
FROM gradle:8.8-jdk21-alpine as build
COPY . .
ARG RELEASE_VERSION=${RELEASE_VERSION:-0.0.0}
RUN gradle -Pversion=docker -i -s --no-daemon bootJar

FROM openjdk:21-alpine as production
COPY --from=build /home/gradle/build/libs/allure-server-docker.jar /allure-server-docker.jar
FROM openjdk:21-slim
COPY build/libs/allure-server.jar /allure-server-docker.jar
# Set port
EXPOSE ${PORT:-8080}
# Run application
ENV JAVA_OPTS="-Xms256m -Xmx2048m"
ENTRYPOINT ["java", "-Dloader.path=/ext", "-cp", "allure-server-docker.jar", "-Dspring.profiles.active=${SPRING_PROFILES_ACTIVE:default}", "org.springframework.boot.loader.PropertiesLauncher"]
ENTRYPOINT ["java", "-Dloader.path=/ext", "-jar", "allure-server-docker.jar", "-Dspring.profiles.active=${SPRING_PROFILES_ACTIVE:default}"]
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,9 @@ tasks.named("openApiGenerate") {
compileJava.dependsOn tasks.openApiGenerate
compileTestJava.dependsOn tasks.openApiGenerate
sourceSets.main.java.srcDirs += tasks.openApiGenerate

bootJar {
manifest {
attributes 'Main-Class': 'org.springframework.boot.loader.launch.PropertiesLauncher'
}
}
3 changes: 3 additions & 0 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,7 @@ dependencies {
/* Testing */
testImplementation 'org.assertj:assertj-core'
testImplementation('org.springframework.boot:spring-boot-starter-test')

implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-loader-tools'
}

0 comments on commit 38d8ac6

Please sign in to comment.