FROM gradle:8-jdk17 as build
WORKDIR /{{artifactId}}
COPY build.gradle build.gradle
COPY settings.gradle settings.gradle
COPY src src
COPY conf conf
RUN gradle shadowJar

FROM eclipse-temurin:17-jdk
WORKDIR /{{artifactId}}
COPY --from=build /{{artifactId}}/{{finalArtifactId}} app.jar
COPY conf conf
EXPOSE 8080
CMD ["java", "-jar", "app.jar"]
