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

Step2 - 서비스 배포하기 #468

Merged
merged 5 commits into from Jun 4, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Expand Up @@ -64,7 +64,7 @@ npm run dev

### 2단계 - 배포하기
1. TLS가 적용된 URL을 알려주세요
- URL :
- URL : https://stevejkang.kro.kr/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

접속 확인하였습니다 👍


---

Expand Down Expand Up @@ -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를 사용하도록 설정
3 changes: 3 additions & 0 deletions build.gradle
Expand Up @@ -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'

Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/application-local.properties
@@ -0,0 +1,3 @@
spring.datasource.driver-class-name=org.h2.Driver
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

환경별로 분리해보셨군요! 👍

spring.datasource.url=jdbc:h2:mem:test
spring.jpa.hibernate.ddl-auto=create-drop
5 changes: 5 additions & 0 deletions 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
3 changes: 3 additions & 0 deletions 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