diff --git a/README.md b/README.md index 57fdfc7e..8184d752 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ npm run dev ### 2단계 - 배포하기 1. TLS가 적용된 URL을 알려주세요 -- URL : +- URL : https://stevejkang.kro.kr/ --- @@ -106,3 +106,14 @@ npm run dev #### 웹 애플리케이션 배포 - [x] 외부망에 웹 애플리케이션을 배포 - [x] DNS 설정 + +## 2단계 - 서비스 배포하기 +### 기능 요구사항 +- [x] 운영 환경 구성하기 + - [x] 웹 애플리케이션 앞단에 Reverse Proxy 구성하기 + - [x] 외부망에 Nginx로 Reverse Proxy를 구성 + - [x] Reverse Proxy에 TLS 설정 + - [x] 운영 데이터베이스 구성하기 +- [x] 개발 환경 구성하기 + - [x] 설정 파일 나누기 + - JUnit => h2 / Local => docker(mysql) / Prod => 운영 DB를 사용하도록 설정 diff --git a/build.gradle b/build.gradle index f8f03e15..4647f6a7 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,9 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + // database + implementation 'mysql:mysql-connector-java' + // handlebars implementation 'pl.allegro.tech.boot:handlebars-spring-boot-starter:0.3.0' diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties new file mode 100644 index 00000000..87722d35 --- /dev/null +++ b/src/main/resources/application-local.properties @@ -0,0 +1,3 @@ +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.url=jdbc:h2:mem:test +spring.jpa.hibernate.ddl-auto=create-drop diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 00000000..e4419a21 --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,5 @@ +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.url=jdbc:mysql://192.168.9.156:3306/subway?useSSL=false +spring.datasource.username=root +spring.datasource.password=masterpw +spring.jpa.hibernate.ddl-auto=none diff --git a/src/test/resources/application-test.properties b/src/test/resources/application-test.properties new file mode 100644 index 00000000..87722d35 --- /dev/null +++ b/src/test/resources/application-test.properties @@ -0,0 +1,3 @@ +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.url=jdbc:h2:mem:test +spring.jpa.hibernate.ddl-auto=create-drop