FROM gradle:8.14.3-jdk21 AS build
LABEL authors="DANIL_BODRY"
WORKDIR /app
COPY . .
RUN gradle clean build

FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /app/build/libs/*-fat.jar app.jar

EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
