-
Notifications
You must be signed in to change notification settings - Fork 1
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
[CHORE] 환경 분리를 위한 yml 파일 변경 #106
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
52a2664
[CHORE] 환경 분리를 위한 yaml 파일 변경 #105
ddongseop d907d08
[CHORE] 환경 분리를 위한 yaml 파일 변경 #105
ddongseop 3eba96a
[CHORE] AWS Secrets Manager을 활용한 환경변수 적용 #105
ddongseop 25eaee1
[CHORE] AWS Secrets Manager 오타 수정 #105
ddongseop 02ea9a4
[CHORE] AWS Secrets Manager에 맞춘 상세 설정 #105
ddongseop 5f82948
[CHORE] 환경변수가 대문자와 언더바만 사용하도록 변경 #105
ddongseop ff88fe8
[CHORE] 보안 암호 이름 수정 #105
ddongseop 8904a05
[CHORE] 환경변수 오타 수정 #105
ddongseop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,25 +41,22 @@ jobs: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
|
||
# 3) 환경변수 파일 생성 | ||
- name: make application.yml 파일 생성 | ||
|
||
# 3) AWS Secrets Manger 환경변수 사용 | ||
- name: Read secrets from AWS Secrets Manager into environment variables | ||
uses: abhilash1in/[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
secrets: /secret/umbba-dev | ||
parse-json: false | ||
|
||
# 4) FCM secret key 파일 생성 | ||
- name: FCM secret key 파일 생성 | ||
run: | | ||
# application.yml 파일 생성 | ||
cd ./umbba-api/src/main/resources | ||
rm application.yaml | ||
|
||
touch ./application.yml | ||
|
||
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | ||
echo "${{ secrets.UMBBA_SECRET }}" >> ./application.yml | ||
|
||
# 생성된 파일 확인 | ||
cat ./application.yml | ||
|
||
#################################### | ||
|
||
# FCM secret key 폴더 생성 | ||
mkdir ./firebase | ||
cd ./firebase | ||
|
||
|
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 |
---|---|---|
|
@@ -49,25 +49,17 @@ jobs: | |
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
# 3) 환경변수 파일 생성 | ||
- name: make application.yml 파일 생성 | ||
run: | | ||
## create application.yml | ||
cd ./umbba-api/src/main/resources | ||
rm application.yaml | ||
|
||
# application.yml 파일 생성 | ||
touch ./application.yml | ||
|
||
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | ||
echo "${{ secrets.UMBBA_SECRET }}" >> ./application.yml | ||
|
||
# application.yml 파일 확인 | ||
cat ./application.yml | ||
# 3) AWS Secrets Manger 환경변수 사용 | ||
- name: Read secrets from AWS Secrets Manager into environment variables | ||
uses: abhilash1in/[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
secrets: /secret/umbba-dev | ||
parse-json: false | ||
|
||
shell: bash | ||
|
||
# 이 워크플로우는 gradle build | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
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 |
---|---|---|
|
@@ -42,24 +42,21 @@ jobs: | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
|
||
# 3) 환경변수 파일 생성 | ||
- name: make application.yml 파일 생성 | ||
# 3) AWS Secrets Manger 환경변수 사용 | ||
- name: Read secrets from AWS Secrets Manager into environment variables | ||
uses: abhilash1in/[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
secrets: /secret/umbba-dev | ||
parse-json: false | ||
|
||
# 4) FCM secret key 파일 생성 | ||
- name: FCM secret key 파일 생성 | ||
run: | | ||
# application.yml 파일 생성 | ||
cd ./umbba-notification/src/main/resources | ||
rm application.yaml | ||
|
||
touch ./application.yml | ||
|
||
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | ||
echo "${{ secrets.UMBBA_SECRET }}" >> ./application.yml | ||
|
||
# 생성된 파일 확인 | ||
cat ./application.yml | ||
|
||
#################################### | ||
cd ./umbba-api/src/main/resources | ||
|
||
# FCM secret key 폴더 생성 | ||
mkdir ./firebase | ||
cd ./firebase | ||
|
||
|
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 |
---|---|---|
|
@@ -50,23 +50,15 @@ jobs: | |
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
# 3) 환경변수 파일 생성 | ||
- name: make application.yml 파일 생성 | ||
run: | | ||
## create application.yml | ||
cd ./umbba-notification/src/main/resources | ||
rm application.yaml | ||
|
||
# application.yml 파일 생성 | ||
touch ./application.yml | ||
|
||
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | ||
echo "${{ secrets.UMBBA_SECRET }}" >> ./application.yml | ||
|
||
# application.yml 파일 확인 | ||
cat ./application.yml | ||
|
||
shell: bash | ||
# 3) AWS Secrets Manger 환경변수 사용 | ||
- name: Read secrets from AWS Secrets Manager into environment variables | ||
uses: abhilash1in/[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
secrets: /secret/umbba-dev | ||
parse-json: false | ||
|
||
# 이 워크플로우는 gradle build | ||
- name: Grant execute permission for gradlew | ||
|
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
This file was deleted.
Oops, something went wrong.
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,137 @@ | ||
spring: | ||
profiles: | ||
group: | ||
"local": "local_setting, common" | ||
"local_notification": "local_notification_setting, common" | ||
"set1": "set1_setting, common" | ||
"set2": "set2_setting, common" | ||
"notification": "notification_setting, common" | ||
active: local | ||
|
||
# common | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: common | ||
|
||
datasource: | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
url: ${DB_URL} | ||
username: ${DB_USER} | ||
password: ${DB_PWD} | ||
hikari: | ||
pool-name: Hikari 커넥션 풀 # Pool | ||
connection-timeout: 30000 # 30초(default: 30초) | ||
maximum-pool-size: 10 # default: 10개 | ||
max-lifetime: 600000 # 10분(default: 30분) | ||
leak-detection-threshold: 3500 # default: 0(이용X) | ||
|
||
jpa: | ||
show-sql: false | ||
hibernate: | ||
ddl-auto: update | ||
ejb: | ||
naming_strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | ||
properties: | ||
hibernate: | ||
format_sql: true | ||
|
||
cloud: | ||
aws: | ||
credentials: | ||
accessKey: ${CLOUD_ACCESS} | ||
secretKey: ${CLOUD_SECRET} | ||
region: | ||
static: ${CLOUD_REGION} | ||
s3: | ||
bucket: ${BUCKET_NAME} | ||
stack: | ||
auto: false | ||
sqs: | ||
notification: | ||
name: ${SQS_NOTIFICATION_NAME} | ||
url: ${SQS_NOTIFICATION_URL} | ||
|
||
kakao: | ||
client-id: ${KAKAO_ID} | ||
authorization-grant-type: authorization_code | ||
redirect-uri: ${KAKAO_REDIRECT} | ||
apple: | ||
iss: ${APPLE_ISS} | ||
client-id: ${APPLE_ID} | ||
# nonce: | ||
|
||
jwt: | ||
secret: ${JWT_SECRET} | ||
|
||
slack: | ||
webhook: | ||
url: ${SLACK_URL} | ||
|
||
fcm: | ||
key: | ||
path: ${FCM_JSON_PATH} | ||
scope: ${FCM_SCOPE} | ||
# firebase-create-scoped: "https://www.googleapis.com/auth/firebase.messaging" | ||
api: | ||
url: ${FCM_API_URL} | ||
topic: | ||
"qna_notification" | ||
Comment on lines
+40
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 훨씬 깔꼼&굿 이네요 |
||
|
||
logging: | ||
level: | ||
com: | ||
amazonaws: | ||
util: | ||
EC2MetadataUtils: error | ||
|
||
# local_setting | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: local_setting | ||
|
||
server: | ||
port: 9091 | ||
|
||
# local_notification_setting | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: local_notification_setting | ||
|
||
server: | ||
port: 9092 | ||
|
||
# set1_setting | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: set1_setting | ||
|
||
server: | ||
port: 8081 | ||
|
||
# set2_setting | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: set2_setting | ||
|
||
server: | ||
port: 8082 | ||
|
||
# notification_setting | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: notification_setting | ||
|
||
Comment on lines
+88
to
+135
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 환경 분리 넘 최고다 감사함다 ㅠㅠ |
||
server: | ||
port: 8083 |
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,7 @@ | ||
aws: | ||
secretsmanager: | ||
name: umbba-dev | ||
cloud: | ||
aws: | ||
region: | ||
static: ap-northeast-2 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오오 이거 쓴거 너무 좋은데?