Skip to content

Commit 13ebd53

Browse files
committed
Infra: Blue/Green 배포 사전 준비
- 배포 할 도메인 정보 추가 - 스프링 액추에이터 의존성 추가 (서버 헬스 체크를 위해 추가함.) - EC2 추가 환경변수(민감한 정보) 세팅
1 parent 6234992 commit 13ebd53

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies {
3030
implementation("org.springframework.boot:spring-boot-starter-websocket")
3131
implementation("org.springframework.boot:spring-boot-starter-validation")
3232
implementation("org.springframework.boot:spring-boot-starter-mail")
33+
implementation("org.springframework.boot:spring-boot-starter-actuator")
3334

3435
// Database & JPA
3536
implementation("org.springframework.boot:spring-boot-starter-data-jpa")

infra/terraform/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,14 @@ sudo mkswap /swapfile
194194
sudo swapon /swapfile
195195
sudo sh -c 'echo "/swapfile swap swap defaults 0 0" >> /etc/fstab'
196196
197+
# 환경변수 세팅(/etc/environment)
198+
echo "PASSWORD=${var.password_1}" >> /etc/environment
199+
echo "DOMAIN=${var.catfe_domain_1}" >> /etc/environment
200+
echo "GITHUB_ACCESS_TOKEN_OWNER=${var.github_access_token_1_owner}" >> /etc/environment
201+
ehco "GITHUB_ACCESS_TOKEN=${var.github_access_token_1}" >> /etc/environment
202+
# EC2 환경변수 등록
203+
source /etc/environment
204+
197205
# 도커 설치 및 실행/활성화
198206
yum install docker -y
199207
systemctl enable docker

infra/terraform/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
variable "catfe_domain_1" {
2+
description = "api.catfe.site"
3+
}

0 commit comments

Comments
 (0)