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

[OING-54] chore: mysql 환경변수 설정 및 프로덕션 환경설정 #25

Merged
merged 6 commits into from
Dec 8, 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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|-------------------|-----------------------------|
| MYSQL_URL | MYSQL 주소입니다 (JDBC 형태여야 합니다) |
| MYSQL_USERNAME | MYSQL 사용자 명 입니다. |
| MYSQL_PASSWORD | MYSQL 비밀번호 입니다. |
| SLACK_WEBHOOK_URL | 슬랙 웹훅 URL 입니다. |
| TOKEN_SECRET_KEY | JWT 토큰용 시크릿 키 입니다. |
| OBJECT_STORAGE_REGION | NCP Region 입니다. |
Expand Down
31 changes: 31 additions & 0 deletions gateway/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
spring:
datasource:
hikari:
auto-commit: false
pool-name: bbibbi-sql-pool
minimum-idle: 10
maximum-pool-size: 20
connection-timeout: 60000
max-lifetime: 1800000
idle-timeout: 60000
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jpa:
hibernate:
ddl-auto: validate
open-in-view: false
properties:
hibernate:
create_empty_composites:
enabled: true
show_sql: false
format_sql: false
flyway:
enabled: true
baseline-on-migrate: true
h2:
console:
enabled: false
20 changes: 19 additions & 1 deletion gateway/src/main/resources/application-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
spring:
datasource:
hikari:
auto-commit: false
pool-name: bbibbi-sql-pool
minimum-idle: 10
maximum-pool-size: 20
connection-timeout: 60000
max-lifetime: 1800000
idle-timeout: 60000
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jpa:
hibernate:
ddl-auto: none
ddl-auto: validate
open-in-view: false
properties:
hibernate:
Expand All @@ -15,3 +29,7 @@ spring:
h2:
console:
enabled: false

springdoc:
api-docs:
enabled: false
3 changes: 3 additions & 0 deletions gateway/src/main/resources/application-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ spring:
datasource:
url: jdbc:h2:~/oing;MODE=MYSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;
username: sa
password: ''
flyway:
enabled: false
jpa:
hibernate:
ddl-auto: create-drop
Expand Down
1 change: 1 addition & 0 deletions gateway/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ spring:
datasource:
url: ${MYSQL_URL}
username: ${MYSQL_USERNAME}
password: ${MYSQL_PASSWORD}
jpa:
hibernate:
ddl-auto: update
Expand Down
1 change: 1 addition & 0 deletions gateway/src/main/resources/template-application-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ spring:
datasource:
url: jdbc:h2:~/oing;MODE=MYSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;
username: sa
password: ''
jpa:
hibernate:
ddl-auto: create-drop
Expand Down
Loading