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

[Feat] RDS 설정을 추가한다 #38

Merged
merged 1 commit into from
Oct 5, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
shell: bash # (6) 권한 부여

- name: Build with Gradle
run: ./gradlew clean build
run: ./gradlew clean bootjar -Pprofile=prod
shell: bash # (8) build 시작

- name: Get current time
Expand Down
41 changes: 37 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,52 @@
spring:
profiles:
default: dev
group:
"dev" : "localdb, common"
"prod" : "proddb, common"

---

spring:
config:
activate:
on-profile: "localdb"
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/carGive?serverTimezone=UTC&characterEncoding=UTF-8
username:
username: root
password:

---

spring:
config:
activate:
on-profile: "proddb"
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${RDS_HOST}:3306/carGive?serverTimezone=UTC&characterEncoding=UTF-8
username: ${RDS_USERNAME}
password: ${RDS_PASSWORD}

---

spring:
config:
activate:
on-profile: "common"
jpa:
open-in-view: false
hibernate:
ddl-auto: none
ddl-auto: update
properties:
hibernate:
show_sql: false
format_sql: true
default_batch_fetch_size: 50
default_batch_fetch_size: 50

logging:
level:
com:
amazonaws:
util:
EC2MetadataUtils: error
Loading