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.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Docker Hub 사용자명 (앱 이미지: <DOCKER_USERNAME>/docker-springboot:latest)
DOCKER_USERNAME=your-dockerhub-username

# Spring 프로파일 (평소 prod / 부하테스트 시 prod,loadtest 로 변경하면 헤더 기반 userId 활성화)
SPRING_PROFILES_ACTIVE=prod

# MySQL
MYSQL_ROOT_PASSWORD=change-me-root-password
DB_NAME=course_register
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ dependencies {

// redisson
implementation 'org.redisson:redisson-spring-boot-starter:3.27.2'

// monitoring (부하테스트용 지표: thread pool / connection pool / cpu)
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
}

tasks.named('test') {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
ports:
- "80:8080"
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
DB_HOST: mysql
DB_PORT: 3306
DB_NAME: ${DB_NAME}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void run(String... args) {
private void seedSubjects() {
SubjectDay[] days = SubjectDay.values();
List<Subject> subjects = new ArrayList<>();
for (int i = 1; i <= 20; i++) {
for (int i = 1; i <= 30; i++) {
subjects.add(Subject.builder()
.subjectName("테스트과목" + i)
.professorName("교수" + i)
Expand Down
14 changes: 12 additions & 2 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,15 @@ server:
app:
seed:
enabled: true
member-count: 100
member-password: test1234
member-count: 2500
member-password: test1234

# 부하테스트용 지표 노출 (thread pool / connection pool / cpu)
management:
endpoints:
web:
exposure:
include: health, prometheus
metrics:
tags:
application: course-registration
Loading