-
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.
Rework master workflow for the multi-project build
- Loading branch information
Nikita Pavlovskiy
committed
Aug 19, 2023
1 parent
6184a51
commit 98591f6
Showing
7 changed files
with
103 additions
and
6 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,31 @@ | ||
FROM eclipse-temurin:20 as install-gradle | ||
|
||
WORKDIR /app | ||
|
||
COPY gradlew settings.gradle /app/ | ||
COPY gradle/ /app/gradle/ | ||
|
||
RUN /app/gradlew wrapper | ||
|
||
FROM eclipse-temurin:20 as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY . /app/ | ||
COPY --from=install-gradle /app/.gradle/ /app/.gradle/ | ||
COPY --from=install-gradle /root/.gradle /root/.gradle | ||
|
||
RUN /app/gradlew api:bootJar | ||
|
||
FROM eclipse-temurin:20 as runner | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/.gradle /app/ | ||
COPY --from=builder /app/api/build/libs/carres-*.jar /app/carres.jar | ||
|
||
EXPOSE 8080/tcp | ||
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=2 CMD curl -f http://localhost:8080/actuator/health || exit 1 | ||
|
||
CMD ["java", "-jar", "/app/carres.jar"] |
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ plugins { | |
} | ||
|
||
group = 'com.nikitades' | ||
version = '0.0.1-SNAPSHOT' | ||
version = '0.0.2' | ||
|
||
java { | ||
toolchain { | ||
|
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,11 @@ | ||
bin | ||
build | ||
.vscode | ||
.gradle | ||
README.md | ||
.editorconfig | ||
.gitignore | ||
Dockerfile | ||
gradlew.bat | ||
.idea | ||
.fleet |
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,31 @@ | ||
FROM eclipse-temurin:20 as install-gradle | ||
|
||
WORKDIR /app | ||
|
||
COPY gradlew settings.gradle /app/ | ||
COPY gradle/ /app/gradle/ | ||
|
||
RUN /app/gradlew wrapper | ||
|
||
FROM eclipse-temurin:20 as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY . /app/ | ||
COPY --from=install-gradle /app/.gradle/ /app/.gradle/ | ||
COPY --from=install-gradle /root/.gradle /root/.gradle | ||
|
||
RUN /app/gradlew tg-notifier:bootJar | ||
|
||
FROM eclipse-temurin:20 as runner | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/.gradle /app/ | ||
COPY --from=builder /app/tg-notifier/build/libs/carres-*.jar /app/carres.jar | ||
|
||
EXPOSE 8080/tcp | ||
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=2 CMD curl -f http://localhost:8080/actuator/health || exit 1 | ||
|
||
CMD ["java", "-jar", "/app/carres.jar"] |