-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INFRA] Setting : 임시 배포 backend github action 설정오류 수정
- Loading branch information
1 parent
da319bc
commit 085a792
Showing
4 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -1,11 +1,22 @@ | ||
FROM openjdk:17-alpine | ||
|
||
EXPOSE 8081 | ||
FROM openjdk:17-alpine as build | ||
|
||
WORKDIR /app | ||
|
||
VOLUME /logs | ||
COPY gradlew . | ||
COPY gradle gradle | ||
COPY build.gradle . | ||
COPY src src | ||
|
||
# Ensure gradlew has execution permissions | ||
RUN chmod +x ./gradlew | ||
|
||
ADD ./build/libs/*SHOT.jar /app.jar | ||
# Build the application and run tests | ||
RUN ./gradlew build | ||
|
||
# Use a separate stage for running the application | ||
FROM openjdk:17-alpine | ||
WORKDIR /app | ||
# Correctly reference the jar file from the previous build stage | ||
COPY --from=build /app/build/libs/app-0.0.1-SNAPSHOT.jar /app.jar | ||
|
||
ENTRYPOINT ["java", "-jar", "/app.jar"] | ||
ENTRYPOINT ["java", "-jar", "/app.jar"] |