diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 27dbcbf..189adf5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,12 +5,21 @@ on: branches: - main # main 브랜치에 push될 때 실행 +permissions: + contents: read + jobs: build-and-deploy: runs-on: ubuntu-latest steps: # 1. 저장소 클론 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Checkout repository uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index 3e4422a..28f9b70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,9 @@ -# 베이스 이미지 FROM amazoncorretto:17 - -# 인자 설정 - Jar_File +# FROM openjdk:17-jdk ARG JAR_FILE=build/libs/*.jar -# jar 파일 복제 -COPY ${JAR_FILE} app.jar - -# 인자 설정 부분과 jar 파일 복제 부분 합쳐서 진행해도 무방 -#COPY build/libs/*.jar app.jar +COPY ${JAR_FILE} my-project.jar +# COPY build/libs/*.jar my-project.jar +ENTRYPOINT ["java","-jar","/my-project.jar"] -# 실행 명령어 -ENTRYPOINT ["java", "-jar", "app.jar"] \ No newline at end of file +RUN ln -snf /usr/share/zoneinfo/Asia/Seoul /etc/localtime \ No newline at end of file