Skip to content
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
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MYSQL_DATABASE=commerce_dev_db
MYSQL_ROOT_PASSWORD=je1234
MYSQL_PORT=3308
3 changes: 3 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MYSQL_DATABASE=commerce_prod_db
MYSQL_ROOT_PASSWORD=je1234
MYSQL_PORT=3307
2 changes: 2 additions & 0 deletions buildSrc/src/main/groovy/myproject-convention.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

testAndDevelopmentOnly 'org.springframework.boot:spring-boot-docker-compose'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
Expand Down
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

services:
db:
image: mysql:8.0
container_name: commerce-mysql
env_file:
- .env
ports:
- "${MYSQL_PORT}:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: Asia/Seoul
command:
- --default-authentication-plugin=mysql_native_password
volumes:
- db-data:/var/lib/mysql

# 데이터 영속성을 위함
volumes:
db-data:
15 changes: 15 additions & 0 deletions platform/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
spring:
datasource:
hikari:
maximum-pool-size: 20
connection-timeout: 3000

jpa:
hibernate:
ddl-auto: validate

docker:
compose:
enabled: false
file: docker-compose.yml
env-file: .env.prod
21 changes: 9 additions & 12 deletions platform/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
spring:
application:
name: platform

datasource:
url: jdbc:mysql://localhost:3306/payment_db?serverTimezone=Asia/Seoul
username: root
password:
hikari:
maximum-pool-size: 20
connection-timeout: 3000
Expand All @@ -16,12 +16,9 @@ spring:
format_sql: true
dialect: org.hibernate.dialect.MySQLDialect


logging:
level:
org.hibernate.SQL: info

#jasypt: todo

aes256:
key: 61qDonoZcEtIEvUZVPkIKIYovHH82rXtK7T1g/rcc1k=
docker:
compose:
enabled: true
file: docker-compose.yml
env-file: .env
lifecycle-management: start_only
Loading