Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Cloudfront PrivateKey 이슈 해결 #370

Merged
merged 3 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ jobs:
echo "$APPLICATION_DEV" > ./application-dev.yml

# 폴더 생성
mkdir key templates
mkdir templates

# key cloudfront 키 넣기
cd key
touch ./private_key.pem
echo "$CLOUDFRONT_KEY" > ./private_key.pem
# 메일 관련된 html 파일 생성
cd ../templates
cd ./templates
touch ./ApproveMail.html
echo "$MAIL_APPROVE_TEMPLATE" > ./ApproveMail.html

Expand All @@ -73,7 +69,6 @@ jobs:
MAIL_APPROVE_TEMPLATE: ${{ secrets.MAIL_APPROVE_TEMPLATE }}
MAIL_VERIFY_TEMPLATE: ${{ secrets.MAIL_VERIFY_TEMPLATE }}
MAIL_APPLICATION_NOTIFICATION_TEMPLATE: ${{ secrets.MAIL_APPLICATION_NOTIFICATION_TEMPLATE }}
CLOUDFRONT_KEY: ${{ secrets.CLOUD_FRONT_KEY }}
shell: bash

- name: Gradle 권한 부여
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ FROM openjdk:17
ARG JAR_FILE=*.jar
### JAR_FILE 경로에 해당하는 파일을 Docker 이미지 내부로 복사한다.
COPY ${JAR_FILE} meeteam.jar
### CloudFront Private Key 복사
COPY private_key.pem /app/private_key.pem
### Docker 컨테이너가 시작될 때 실행할 명령을 지정한다.
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=dev","-Duser.timezone=Asia/Seoul","meeteam.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public String getSignedUrl(String path, String fileName) {
} catch (AwsException e) {
throw new AwsException(AwsExceptionType.FAIL_GET_URL);
} catch (Exception e) {
System.out.println(e.getMessage());
throw new AwsException(AwsExceptionType.CAN_NOT_FOUND_KEY);
}
}
Expand Down
Loading