-
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 fix/invalid-credentials-on-email-doesnt-e…
…xist
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 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
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,27 @@ | ||
# Setup builder | ||
FROM gradle:8.5.0-jdk17-alpine AS build | ||
ENV APP_HOME=/usr/app | ||
WORKDIR ${APP_HOME} | ||
COPY build.gradle.kts settings.gradle.kts ${APP_HOME} | ||
|
||
# Configure repository | ||
COPY gradle ${APP_HOME}/gradle | ||
COPY --chown=gradle:gradle . /home/gradle/src | ||
USER root | ||
RUN chown -R gradle /home/gradle/src | ||
|
||
# Build jar | ||
RUN gradle build || return 0 | ||
COPY . . | ||
RUN gradle clean build | ||
|
||
# Setup runner | ||
FROM gradle:8.5.0-jdk17-alpine AS runner | ||
ENV ARTIFACT_NAME=backend-0.0.1-SNAPSHOT.jar | ||
ENV APP_HOME=/usr/app | ||
WORKDIR ${APP_HOME} | ||
COPY --from=build ${APP_HOME}/build/libs/${ARTIFACT_NAME} . | ||
|
||
# Run | ||
EXPOSE 8080 | ||
ENTRYPOINT ["sh", "-c", "java -jar ${ARTIFACT_NAME}"] |