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

merge: (#106) dev/prod 개발환경 분리 #108

Merged
merged 4 commits into from
Oct 12, 2022
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
35 changes: 35 additions & 0 deletions simtong-infrastructure/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
spring:
datasource:
url: jdbc:mysql://${DB_URL:localhost}:3306/${DB_NAME:simtong}?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true
username: ${MYSQL_USERNAME}
password: ${MYSQL_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver

jpa:
hibernate:
ddl-auto: update
properties:
hibernate:
format_sql: true
show_sql: true
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
open-in-view: false

redis:
port: 6379
host: localhost

cloud:
aws:
credentials:
access-key: ${AWS_ACCESS}
secret-key: ${AWS_SECRET}
region:
static: ${AWS_REGION:ap-northeast-2}
auto: false
stack:
auto: false
s3:
bucket: ${BUCKET_NAME:simtong}
ses:
source: ${SES_SENDER}
35 changes: 35 additions & 0 deletions simtong-infrastructure/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
spring:
datasource:
url: jdbc:mysql://${DB_URL}:3306/${DB_NAME}?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true
username: ${MYSQL_USERNAME}
password: ${MYSQL_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver

jpa:
hibernate:
ddl-auto: ${DDL:validate}
properties:
hibernate:
format_sql: ${FORMAT_SQL:false}
show_sql: ${SHOW_SQL:false}
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
open-in-view: false

redis:
port: ${REDIS_PORT}
host: ${REDIS_HOST}

cloud:
aws:
credentials:
access-key: ${AWS_ACCESS}
secret-key: ${AWS_SECRET}
region:
static: ${AWS_REGION:ap-northeast-2}
auto: false
stack:
auto: false
s3:
bucket: ${BUCKET_NAME:simtong}
ses:
source: ${SES_SENDER}
51 changes: 15 additions & 36 deletions simtong-infrastructure/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,31 @@ spring:
lifecycle:
timeout-per-shutdown-phase: "60s"

datasource:
url: jdbc:mysql://${DB_URL:localhost}:3306/${DB_NAME}?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true
username: ${MYSQL_USERNAME}
password: ${MYSQL_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver

jpa:
hibernate:
ddl-auto: ${DDL:validate}
properties:
hibernate:
format_sql: ${FORMAT_SQL:true}
show_sql: ${SHOW_SQL:true}
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
open-in-view: false

jackson:
property-naming-strategy: SNAKE_CASE

redis:
port: ${REDIS_PORT:6379}
host: ${REDIS_HOST:localhost}

security:
secret-key: ${SECRET_KEY:asdfasfdasfadsf}
access-exp: ${ACCESS_EXP:180}
refresh-exp: ${REFRESH_EXP:180}

cloud:
aws:
credentials:
access-key: ${AWS_ACCESS}
secret-key: ${AWS_SECRET}
region:
static: ${AWS_REGION:ap-northeast-2}
auto: false
stack:
auto: false
s3:
bucket: ${BUCKET_NAME:simtong}
ses:
source: ${SES_SENDER}

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

---

spring:
config:
activate:
on-profile: dev

---

spring:
config:
activate:
on-profile: prod