Skip to content

Commit

Permalink
Build: 배포/개발 환경 분리 application 프로파일 설정
Browse files Browse the repository at this point in the history
- 환경변수 설정
  • Loading branch information
ku-kim committed Apr 26, 2022
1 parent fbb5a66 commit 9f62389
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
18 changes: 18 additions & 0 deletions BE/src/main/resources/application-dev.yml
@@ -0,0 +1,18 @@
spring:
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:testSideDish;DB_CLOSE_ON_EXIT=FALSE
username: sa

sql:
init:
mode: always
schema-locations: classpath:db/schema.sql
data-locations: classpath:db/data.sql
h2:
console:
enabled: true

logging:
level:
sql: DEBUG
6 changes: 6 additions & 0 deletions BE/src/main/resources/application-prod.yml
@@ -0,0 +1,6 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${MYSQL_DATABASE}
username: ${MYSQL_USER}
password: ${MYSQL_PASSWORD}
20 changes: 2 additions & 18 deletions BE/src/main/resources/application.yml
@@ -1,19 +1,3 @@
spring:
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:testSideDish;DB_CLOSE_ON_EXIT=FALSE
username: sa

sql:
init:
mode: always
schema-locations: classpath:db/schema.sql
data-locations: classpath:db/data.sql
h2:
console:
enabled: true


logging:
level:
sql: DEBUG
profiles:
active: ${SIDEDISH_PROFILE}

0 comments on commit 9f62389

Please sign in to comment.