Skip to content

Commit

Permalink
[INFRA] Setting : 임시 배포 backend github action 설정오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
404-not-foundl committed Jun 10, 2024
1 parent da319bc commit 085a792
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
12 changes: 0 additions & 12 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ jobs:
echo "${{ secrets.APP_PROPERTIES_PROD }}" >> backend/src/main/resources/application-prod.properties
echo "${{ secrets.APP_PROPERTIES }}" >> backend/src/main/resources/application.properties
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'

- name: Grant execute permission for gradlew
run: chmod +x backend/gradlew

- name: Build with Gradle
run: ./gradlew build
working-directory: backend

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
Expand Down
23 changes: 17 additions & 6 deletions backend/Dockerfile
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"]

0 comments on commit 085a792

Please sign in to comment.