From 51a363cbe8ea0e4ef1d797d52f30453e6b488ced Mon Sep 17 00:00:00 2001 From: Sanghyun Yi Date: Thu, 12 Feb 2026 23:41:53 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=EA=B2=BD=EB=A7=A4=EC=9E=A5=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EA=B8=B0=EB=B3=B8=20=EC=A0=95=EB=A0=AC=20?= =?UTF-8?q?=EA=B8=B0=EC=A4=80=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AuctionRealtimeQueryDslRepository.java | 4 ++-- .../rest/dto/request/RealtimePageRequestDto.java | 11 +++++++---- .../rest/dto/request/RealtimeSortField.java | 2 +- .../the/eternity/common/request/PageRequestDto.java | 5 ++++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/main/java/until/the/eternity/auctionrealtime/infrastructure/persistence/AuctionRealtimeQueryDslRepository.java b/src/main/java/until/the/eternity/auctionrealtime/infrastructure/persistence/AuctionRealtimeQueryDslRepository.java index d3e25e59..84bb5aa4 100644 --- a/src/main/java/until/the/eternity/auctionrealtime/infrastructure/persistence/AuctionRealtimeQueryDslRepository.java +++ b/src/main/java/until/the/eternity/auctionrealtime/infrastructure/persistence/AuctionRealtimeQueryDslRepository.java @@ -409,13 +409,13 @@ private List> buildOrderSpecifiers( case "auctionPricePerUnit" -> new OrderSpecifier<>(direction, ar.auctionPricePerUnit); case "itemName" -> new OrderSpecifier<>(direction, ar.itemName); - default -> new OrderSpecifier<>(Order.ASC, ar.dateAuctionExpire); + default -> new OrderSpecifier<>(Order.DESC, ar.dateAuctionExpire); }; orders.add(orderSpecifier); } } else { - orders.add(new OrderSpecifier<>(Order.ASC, ar.dateAuctionExpire)); + orders.add(new OrderSpecifier<>(Order.DESC, ar.dateAuctionExpire)); } return orders; diff --git a/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimePageRequestDto.java b/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimePageRequestDto.java index 9719ba72..34432a91 100644 --- a/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimePageRequestDto.java +++ b/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimePageRequestDto.java @@ -11,22 +11,25 @@ @Schema(description = "실시간 경매장 페이지 요청 파라미터") public record RealtimePageRequestDto( @Schema(description = "요청할 페이지 번호 (1부터 시작)", example = "1") @Min(1) Integer page, - @Schema(description = "페이지당 항목 수", example = "20") @Min(1) @Max(100) Integer size, + @Schema(description = "페이지당 항목 수 (10~50)", example = "20") @Min(10) @Max(50) Integer size, @Schema( description = - "정렬 필드 (dateAuctionExpire, dateRegister, auctionPricePerUnit, itemName)", + "정렬 필드 (dateAuctionExpire, dateAuctionRegister, auctionPricePerUnit, itemName)", example = "dateAuctionExpire") RealtimeSortField sortBy, - @Schema(description = "정렬 방향 (ASC, DESC)", example = "ASC") SortDirection direction) { + @Schema(description = "정렬 방향 (ASC, DESC)", example = "DESC") SortDirection direction) { private static final int DEFAULT_PAGE = 1; private static final int DEFAULT_SIZE = 20; + private static final int MIN_SIZE = 10; + private static final int MAX_SIZE = 50; private static final RealtimeSortField DEFAULT_SORT_BY = RealtimeSortField.DATE_AUCTION_EXPIRE; - private static final SortDirection DEFAULT_DIRECTION = SortDirection.ASC; + private static final SortDirection DEFAULT_DIRECTION = SortDirection.DESC; public Pageable toPageable() { int resolvedPage = this.page != null ? this.page - 1 : DEFAULT_PAGE - 1; int resolvedSize = this.size != null ? this.size : DEFAULT_SIZE; + resolvedSize = Math.max(MIN_SIZE, Math.min(MAX_SIZE, resolvedSize)); RealtimeSortField resolvedSortBy = this.sortBy != null ? this.sortBy : DEFAULT_SORT_BY; SortDirection resolvedDirection = this.direction != null ? this.direction : DEFAULT_DIRECTION; diff --git a/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimeSortField.java b/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimeSortField.java index 7d56e88d..06e233cf 100644 --- a/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimeSortField.java +++ b/src/main/java/until/the/eternity/auctionrealtime/interfaces/rest/dto/request/RealtimeSortField.java @@ -10,7 +10,7 @@ @Schema(description = "실시간 경매장 정렬 필드", enumAsRef = true) public enum RealtimeSortField { DATE_AUCTION_EXPIRE("dateAuctionExpire", "경매 만료 일시"), - DATE_REGISTER("dateRegister", "등록 일시"), + DATE_AUCTION_REGISTER("dateRegister", "등록 일시"), AUCTION_PRICE_PER_UNIT("auctionPricePerUnit", "개당 가격"), ITEM_NAME("itemName", "아이템 이름"); diff --git a/src/main/java/until/the/eternity/common/request/PageRequestDto.java b/src/main/java/until/the/eternity/common/request/PageRequestDto.java index 793c15f2..f527be43 100644 --- a/src/main/java/until/the/eternity/common/request/PageRequestDto.java +++ b/src/main/java/until/the/eternity/common/request/PageRequestDto.java @@ -12,7 +12,7 @@ @Schema(description = "페이지 요청 파라미터") public record PageRequestDto( @Schema(description = "요청할 페이지 번호 (1부터 시작)", example = "1") @Min(1) Integer page, - @Schema(description = "페이지당 항목 수", example = "20") @Min(1) @Max(100) Integer size, + @Schema(description = "페이지당 항목 수 (10~50)", example = "20") @Min(10) @Max(50) Integer size, @Schema( description = "정렬 필드 (dateAuctionBuy, auctionPricePerUnit, itemName)", example = "dateAuctionBuy") @@ -20,12 +20,15 @@ public record PageRequestDto( @Schema(description = "정렬 방향 (ASC, DESC)", example = "DESC") SortDirection direction) { private static final int DEFAULT_PAGE = 1; private static final int DEFAULT_SIZE = 20; + private static final int MIN_SIZE = 10; + private static final int MAX_SIZE = 50; private static final SortField DEFAULT_SORT_BY = SortField.DATE_AUCTION_BUY; private static final SortDirection DEFAULT_DIRECTION = SortDirection.DESC; public Pageable toPageable() { int resolvedPage = this.page != null ? this.page - 1 : DEFAULT_PAGE - 1; int resolvedSize = this.size != null ? this.size : DEFAULT_SIZE; + resolvedSize = Math.max(MIN_SIZE, Math.min(MAX_SIZE, resolvedSize)); SortField resolvedSortBy = this.sortBy != null ? this.sortBy : DEFAULT_SORT_BY; SortDirection resolvedDirection = this.direction != null ? this.direction : DEFAULT_DIRECTION; From 8a3def4540025102c89af1b666ff9b5fa9e91a74 Mon Sep 17 00:00:00 2001 From: Sanghyun Yi Date: Fri, 13 Feb 2026 00:07:24 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=EC=95=84=EC=9D=B4=ED=85=9C=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=EC=A0=95=EB=B3=B4=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=8B=9C=20=ED=95=84=EC=88=98=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=20=ED=95=B4=EC=A0=9C=20=EB=B0=8F=20=EA=B8=B0=EB=B3=B8?= =?UTF-8?q?=20=EC=A0=95=EB=A0=AC=20=EA=B8=B0=EC=A4=80=20=EB=B3=B4=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iteminfo/application/service/ItemInfoService.java | 10 ---------- .../interfaces/rest/controller/ItemInfoController.java | 9 +++++---- .../rest/dto/request/ItemInfoPageRequestDto.java | 8 ++++++-- .../rest/dto/request/ItemInfoSearchRequest.java | 5 +---- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/main/java/until/the/eternity/iteminfo/application/service/ItemInfoService.java b/src/main/java/until/the/eternity/iteminfo/application/service/ItemInfoService.java index 75ba6584..68d49361 100644 --- a/src/main/java/until/the/eternity/iteminfo/application/service/ItemInfoService.java +++ b/src/main/java/until/the/eternity/iteminfo/application/service/ItemInfoService.java @@ -7,10 +7,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import until.the.eternity.auctionhistory.domain.repository.AuctionHistoryRepositoryPort; -import until.the.eternity.common.exception.CustomException; import until.the.eternity.iteminfo.domain.entity.ItemInfo; import until.the.eternity.iteminfo.domain.entity.ItemInfoId; -import until.the.eternity.iteminfo.domain.exception.ItemInfoExceptionCode; import until.the.eternity.iteminfo.domain.repository.ItemInfoRepositoryPort; import until.the.eternity.iteminfo.interfaces.rest.dto.request.ItemInfoSearchRequest; import until.the.eternity.iteminfo.interfaces.rest.dto.response.ItemCategoryResponse; @@ -53,7 +51,6 @@ public List findBySubCategory(String subCategory) { public Page findAllDetail( ItemInfoSearchRequest searchRequest, Pageable pageable) { - validateTopCategory(searchRequest); Page itemInfoPage = itemInfoRepository.searchWithPagination(searchRequest, pageable); return itemInfoPage.map(ItemInfoResponse::from); @@ -62,7 +59,6 @@ public Page findAllDetail( public List findAllSummary( ItemInfoSearchRequest searchRequest, org.springframework.data.domain.Sort.Direction direction) { - validateTopCategory(searchRequest); // direction을 Pageable로 변환 Pageable pageable = org.springframework.data.domain.PageRequest.of( @@ -73,12 +69,6 @@ public List findAllSummary( return ItemInfoSummaryResponse.from(itemInfos); } - private void validateTopCategory(ItemInfoSearchRequest searchRequest) { - if (searchRequest.topCategory() == null || searchRequest.topCategory().isBlank()) { - throw new CustomException(ItemInfoExceptionCode.TOP_CATEGORY_REQUIRED); - } - } - @Transactional public ItemInfoSyncResponse syncItemInfoFromAuctionHistory() { log.info("Starting to sync ItemInfo from AuctionHistory"); diff --git a/src/main/java/until/the/eternity/iteminfo/interfaces/rest/controller/ItemInfoController.java b/src/main/java/until/the/eternity/iteminfo/interfaces/rest/controller/ItemInfoController.java index ddb1c49a..a7241238 100644 --- a/src/main/java/until/the/eternity/iteminfo/interfaces/rest/controller/ItemInfoController.java +++ b/src/main/java/until/the/eternity/iteminfo/interfaces/rest/controller/ItemInfoController.java @@ -45,8 +45,9 @@ public List getAllItemInfos() { summary = "아이템 상세 정보 페이지네이션 조회", description = "아이템 정보를 페이지네이션과 함께 조회합니다. " - + "topCategory는 필수 파라미터이며, name, subCategory로 추가 필터링 가능합니다. " - + "name 컬럼 기준으로 정렬됩니다.") + + "topCategory는 선택 파라미터이며, name, subCategory로 추가 필터링 가능합니다. " + + "정렬 기준은 item_name(ASC/DESC)이고 기본값은 ASC입니다. " + + "page는 1 이상, size는 10~50 사이 값만 허용됩니다.") @GetMapping("/detail") public ResponseEntity>> getItemInfosDetail( @Valid @ModelAttribute ItemInfoPageRequestDto pageRequest, @@ -60,8 +61,8 @@ public ResponseEntity>> getItemInfosDetail( summary = "아이템 요약 정보 조회", description = "아이템의 이름, 상위 카테고리, 하위 카테고리만 조회합니다. " - + "topCategory는 필수 파라미터이며, name, subCategory로 추가 필터링 가능합니다. " - + "name 컬럼 기준으로 정렬됩니다.") + + "topCategory는 선택 파라미터이며, name, subCategory로 추가 필터링 가능합니다. " + + "정렬 기준은 item_name이며 direction 파라미터로 ASC/DESC를 지정합니다.") @GetMapping("/summary") public ResponseEntity>> getItemInfosSummary( @Parameter(description = "정렬 방향 (ASC, DESC)", example = "ASC") diff --git a/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoPageRequestDto.java b/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoPageRequestDto.java index 8ee8b2bf..4ffad2b3 100644 --- a/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoPageRequestDto.java +++ b/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoPageRequestDto.java @@ -11,16 +11,20 @@ @Schema(description = "아이템 정보 페이지 요청 파라미터") public record ItemInfoPageRequestDto( @Schema(description = "요청할 페이지 번호 (1부터 시작)", example = "1") @Min(1) Integer page, - @Schema(description = "페이지당 항목 수", example = "20") @Min(1) @Max(50) Integer size, - @Schema(description = "정렬 방향 (ASC, DESC)", example = "ASC") SortDirection direction) { + @Schema(description = "페이지당 항목 수 (10~50)", example = "20") @Min(10) @Max(50) Integer size, + @Schema(description = "정렬 방향 (item_name 기준 ASC, DESC)", example = "ASC") + SortDirection direction) { private static final int DEFAULT_PAGE = 1; private static final int DEFAULT_SIZE = 20; + private static final int MIN_SIZE = 10; + private static final int MAX_SIZE = 50; private static final SortDirection DEFAULT_DIRECTION = SortDirection.ASC; private static final String SORT_FIELD = "id.name"; public Pageable toPageable() { int resolvedPage = this.page != null ? this.page - 1 : DEFAULT_PAGE - 1; int resolvedSize = this.size != null ? this.size : DEFAULT_SIZE; + resolvedSize = Math.max(MIN_SIZE, Math.min(MAX_SIZE, resolvedSize)); SortDirection resolvedDirection = this.direction != null ? this.direction : DEFAULT_DIRECTION; diff --git a/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoSearchRequest.java b/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoSearchRequest.java index 66a46d84..f3777098 100644 --- a/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoSearchRequest.java +++ b/src/main/java/until/the/eternity/iteminfo/interfaces/rest/dto/request/ItemInfoSearchRequest.java @@ -1,12 +1,9 @@ package until.the.eternity.iteminfo.interfaces.rest.dto.request; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; @Schema(description = "아이템 정보 검색 요청 파라미터") public record ItemInfoSearchRequest( @Schema(description = "아이템 이름", example = "나뭇가지") String name, @Schema(description = "하위 카테고리", example = "한손검") String subCategory, - @Schema(description = "상위 카테고리 (필수)", example = "무기", required = true) - @NotBlank(message = "상위 카테고리(topCategory)는 필수 파라미터입니다.") - String topCategory) {} + @Schema(description = "상위 카테고리 (선택)", example = "무기") String topCategory) {} From bc25bcf16440620bcc47206d129f1e5b55e1af7c Mon Sep 17 00:00:00 2001 From: Sanghyun Yi Date: Fri, 13 Feb 2026 00:24:36 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=EC=95=84=EC=9D=B4=ED=85=9C=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ItemInfoServiceTest.java | 67 +++++++++++-------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/src/test/java/until/the/eternity/iteminfo/application/service/ItemInfoServiceTest.java b/src/test/java/until/the/eternity/iteminfo/application/service/ItemInfoServiceTest.java index 6e66a736..57644486 100644 --- a/src/test/java/until/the/eternity/iteminfo/application/service/ItemInfoServiceTest.java +++ b/src/test/java/until/the/eternity/iteminfo/application/service/ItemInfoServiceTest.java @@ -8,10 +8,8 @@ import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.data.domain.*; import until.the.eternity.auctionhistory.domain.repository.AuctionHistoryRepositoryPort; -import until.the.eternity.common.exception.CustomException; import until.the.eternity.iteminfo.domain.entity.ItemInfo; import until.the.eternity.iteminfo.domain.entity.ItemInfoId; -import until.the.eternity.iteminfo.domain.exception.ItemInfoExceptionCode; import until.the.eternity.iteminfo.domain.repository.ItemInfoRepositoryPort; import until.the.eternity.iteminfo.interfaces.rest.dto.request.ItemInfoSearchRequest; import until.the.eternity.iteminfo.interfaces.rest.dto.response.ItemCategoryResponse; @@ -23,7 +21,6 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.Mockito.*; @ExtendWith(MockitoExtension.class) @@ -118,29 +115,37 @@ void findAll_should_return_empty_list_when_no_data() { } @Test - @DisplayName("상세 정보 조회 시 topCategory가 없으면 예외가 발생한다") - void findAllDetail_should_throw_exception_when_topCategory_is_null() { + @DisplayName("상세 정보 조회 시 topCategory가 없어도 조회된다") + void findAllDetail_should_allow_null_topCategory() { // given ItemInfoSearchRequest searchRequest = new ItemInfoSearchRequest(null, null, null); Pageable pageable = PageRequest.of(0, 20); + Page emptyPage = new PageImpl<>(List.of(), pageable, 0); + when(itemInfoRepository.searchWithPagination(searchRequest, pageable)).thenReturn(emptyPage); + + // when + Page result = itemInfoService.findAllDetail(searchRequest, pageable); - // when & then - assertThatThrownBy(() -> itemInfoService.findAllDetail(searchRequest, pageable)) - .isInstanceOf(CustomException.class) - .hasMessage(ItemInfoExceptionCode.TOP_CATEGORY_REQUIRED.getMessage()); + // then + assertThat(result.getContent()).isEmpty(); + verify(itemInfoRepository).searchWithPagination(searchRequest, pageable); } @Test - @DisplayName("상세 정보 조회 시 topCategory가 빈 문자열이면 예외가 발생한다") - void findAllDetail_should_throw_exception_when_topCategory_is_blank() { + @DisplayName("상세 정보 조회 시 topCategory가 공백이어도 조회된다") + void findAllDetail_should_allow_blank_topCategory() { // given ItemInfoSearchRequest searchRequest = new ItemInfoSearchRequest(null, null, ""); Pageable pageable = PageRequest.of(0, 20); + Page emptyPage = new PageImpl<>(List.of(), pageable, 0); + when(itemInfoRepository.searchWithPagination(searchRequest, pageable)).thenReturn(emptyPage); + + // when + Page result = itemInfoService.findAllDetail(searchRequest, pageable); - // when & then - assertThatThrownBy(() -> itemInfoService.findAllDetail(searchRequest, pageable)) - .isInstanceOf(CustomException.class) - .hasMessage(ItemInfoExceptionCode.TOP_CATEGORY_REQUIRED.getMessage()); + // then + assertThat(result.getContent()).isEmpty(); + verify(itemInfoRepository).searchWithPagination(searchRequest, pageable); } @Test @@ -191,15 +196,19 @@ void findAllDetail_should_return_filtered_items_with_all_conditions() { } @Test - @DisplayName("요약 정보 조회 시 topCategory가 없으면 예외가 발생한다") - void findAllSummary_should_throw_exception_when_topCategory_is_null() { + @DisplayName("요약 정보 조회 시 topCategory 없이도 조회된다") + void findAllSummary_should_allow_null_topCategory() { // given ItemInfoSearchRequest searchRequest = new ItemInfoSearchRequest(null, null, null); + when(itemInfoRepository.search(eq(searchRequest), any(Pageable.class))).thenReturn(List.of()); - // when & then - assertThatThrownBy(() -> itemInfoService.findAllSummary(searchRequest, Sort.Direction.ASC)) - .isInstanceOf(CustomException.class) - .hasMessage(ItemInfoExceptionCode.TOP_CATEGORY_REQUIRED.getMessage()); + // when + List result = + itemInfoService.findAllSummary(searchRequest, Sort.Direction.ASC); + + // then + assertThat(result).isEmpty(); + verify(itemInfoRepository).search(eq(searchRequest), any(Pageable.class)); } @Test @@ -319,15 +328,19 @@ void findBySubCategory_should_return_empty_list_when_no_results() { } @Test - @DisplayName("요약 정보 조회 시 topCategory가 빈 문자열이면 예외가 발생한다") - void findAllSummary_should_throw_exception_when_topCategory_is_blank() { + @DisplayName("요약 정보 조회 시 topCategory가 공백이어도 조회된다") + void findAllSummary_should_allow_blank_topCategory() { // given ItemInfoSearchRequest searchRequest = new ItemInfoSearchRequest(null, null, ""); + when(itemInfoRepository.search(eq(searchRequest), any(Pageable.class))).thenReturn(List.of()); - // when & then - assertThatThrownBy(() -> itemInfoService.findAllSummary(searchRequest, Sort.Direction.ASC)) - .isInstanceOf(CustomException.class) - .hasMessage(ItemInfoExceptionCode.TOP_CATEGORY_REQUIRED.getMessage()); + // when + List result = + itemInfoService.findAllSummary(searchRequest, Sort.Direction.ASC); + + // then + assertThat(result).isEmpty(); + verify(itemInfoRepository).search(eq(searchRequest), any(Pageable.class)); } @Test From 9cc233fe09afeb1f962b4f25b79f3fc121f7fd87 Mon Sep 17 00:00:00 2001 From: dev-ant Date: Fri, 13 Feb 2026 08:56:56 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20docker-compose=EC=97=90=EC=84=9C=20?= =?UTF-8?q?elastic=20search=20=EC=97=86=EC=9D=B4=EB=8F=84=20spring-app=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=20=EA=B0=80=EB=8A=A5=ED=95=98=EA=B2=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose-dev.yml | 7 ++++++- docker-compose-local.yml | 5 ++--- docker-compose-prod.yml | 7 ++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 07952045..a7bb71a2 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -46,6 +46,11 @@ services: AUCTION_HISTORY_CRON: "${AUCTION_HISTORY_CRON}" STATISTICS_PREVIOUS_DAY_CRON: "${STATISTICS_PREVIOUS_DAY_CRON:-0 0 * * * *}" + # === Elasticsearch Configuration (Dev 기본 비활성화) === + ELASTICSEARCH_ENABLED: "false" + ELASTICSEARCH_INDEX_ENABLED: "false" + MANAGEMENT_HEALTH_ELASTICSEARCH_ENABLED: "false" + # === Docker Configuration === DOCKER_USERNAME: ${DOCKER_USERNAME} DOCKER_REPO: ${DOCKER_REPO} @@ -128,4 +133,4 @@ volumes: networks: app-network: - driver: bridge \ No newline at end of file + driver: bridge diff --git a/docker-compose-local.yml b/docker-compose-local.yml index e2289713..5c3908d2 100644 --- a/docker-compose-local.yml +++ b/docker-compose-local.yml @@ -51,6 +51,7 @@ services: ELASTICSEARCH_ENABLED: ${ELASTICSEARCH_ENABLED:-true} ELASTICSEARCH_INDEX_ENABLED: ${ELASTICSEARCH_INDEX_ENABLED:-true} SPRING_ELASTICSEARCH_URIS: http://elasticsearch:9200 + MANAGEMENT_HEALTH_ELASTICSEARCH_ENABLED: "false" # === JVM Configuration (Local - 경량 개발용) === # Heap: 256m~512m, Non-Heap: 256m, Total: ~768m @@ -90,12 +91,10 @@ services: - app-network - my-network # MySQL 컨테이너와 통신을 위해 추가 - # MySQL, Elasticsearch가 준비될 때까지 대기 + # MySQL 준비될 때까지 대기 (Elasticsearch는 선택 의존성) depends_on: mysql: condition: service_healthy - elasticsearch: - condition: service_healthy # === Health Check (Local - 표준) === healthcheck: diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index cc6c47e7..d0917839 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -18,10 +18,6 @@ services: labels: autoheal: "true" - depends_on: - devnogi-elastic-search: - condition: service_healthy - environment: # === Application Configuration === SPRING_PROFILES_ACTIVE: prod @@ -51,6 +47,7 @@ services: ELASTICSEARCH_ENABLED: ${ELASTICSEARCH_ENABLED:-true} ELASTICSEARCH_INDEX_ENABLED: ${ELASTICSEARCH_INDEX_ENABLED:-true} SPRING_ELASTICSEARCH_URIS: http://devnogi-elastic-search:9200 + MANAGEMENT_HEALTH_ELASTICSEARCH_ENABLED: "false" # === Docker Configuration === DOCKER_USERNAME: ${DOCKER_USERNAME} @@ -182,4 +179,4 @@ networks: driver: bridge devnogi-network: external: true - name: infra_devnogi-network # 기존 인프라 네트워크 (MySQL, Redis) \ No newline at end of file + name: infra_devnogi-network # 기존 인프라 네트워크 (MySQL, Redis)