From 368001849b278cbc82256bc2c306e4576481379a Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 15:49:39 +0900 Subject: [PATCH 01/15] =?UTF-8?q?chore:=20eureka=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=EC=84=B1=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/discovery/build.gradle | 2 +- .../src/main/java/org/samtuap/inong/DiscoveryApplication.java | 4 ++-- backend/live/build.gradle | 2 +- backend/member/build.gradle | 2 +- backend/order/build.gradle | 2 +- backend/product/build.gradle | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/discovery/build.gradle b/backend/discovery/build.gradle index ecb35923..cdfef812 100644 --- a/backend/discovery/build.gradle +++ b/backend/discovery/build.gradle @@ -28,7 +28,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server' } dependencyManagement { diff --git a/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java b/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java index 91a6eba9..470b36ce 100644 --- a/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java +++ b/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java @@ -3,12 +3,12 @@ import jakarta.annotation.PostConstruct; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; +//import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; import java.util.TimeZone; @SpringBootApplication -@EnableEurekaServer +//@EnableEurekaServer public class DiscoveryApplication { public static void main(String[] args) { diff --git a/backend/live/build.gradle b/backend/live/build.gradle index 97be38c9..0accb13f 100644 --- a/backend/live/build.gradle +++ b/backend/live/build.gradle @@ -31,7 +31,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/member/build.gradle b/backend/member/build.gradle index 5c43714a..7db3c5f9 100644 --- a/backend/member/build.gradle +++ b/backend/member/build.gradle @@ -34,7 +34,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/order/build.gradle b/backend/order/build.gradle index 309623b4..9d7e1be4 100644 --- a/backend/order/build.gradle +++ b/backend/order/build.gradle @@ -32,7 +32,7 @@ dependencies { runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' implementation 'io.jsonwebtoken:jjwt:0.9.1' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/product/build.gradle b/backend/product/build.gradle index 0a987abd..fc1ad8e9 100644 --- a/backend/product/build.gradle +++ b/backend/product/build.gradle @@ -29,7 +29,7 @@ dependencies { runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' implementation 'org.mindrot:jbcrypt:0.4' From 718ebd76de5201b564f4336ba21b39716ad8fad9 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 16:03:24 +0900 Subject: [PATCH 02/15] =?UTF-8?q?chore:=20apigateway=EC=97=90=20dockerfile?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_msa_k8s.yml | 15 ++++++++++++ backend/apigateway/Dockerfile | 22 +++++++++++++++++ backend/apigateway/k8s/apigateway-depl.yml | 24 ++++--------------- backend/apigateway/k8s/apigateway-service.yml | 4 ++-- 4 files changed, 44 insertions(+), 21 deletions(-) create mode 100644 backend/apigateway/Dockerfile diff --git a/.github/workflows/deploy_msa_k8s.yml b/.github/workflows/deploy_msa_k8s.yml index 532a07ed..9372d097 100644 --- a/.github/workflows/deploy_msa_k8s.yml +++ b/.github/workflows/deploy_msa_k8s.yml @@ -85,3 +85,18 @@ jobs: run: | kubectl apply -f ./backend/live/k8s/live-depl.yml kubectl rollout restart deployment live-deployment + + # apigateway + - name: build and push docker apigateway images to ecr + env: + REGISTRY: 676206947506.dkr.ecr.ap-northeast-2.amazonaws.com + REPOSITORY: inong/apigateway + run: | + docker build -t $REGISTRY/$REPOSITORY:latest \ + -f ./backend/apigateway/Dockerfile ./backend/apigateway + docker push $REGISTRY/$REPOSITORY:latest + + - name: eks kubectl apply + run: | + kubectl apply -f ./backend/live/k8s/apigateway-depl.yml + kubectl rollout restart deployment apigateway-deployment \ No newline at end of file diff --git a/backend/apigateway/Dockerfile b/backend/apigateway/Dockerfile new file mode 100644 index 00000000..6494c127 --- /dev/null +++ b/backend/apigateway/Dockerfile @@ -0,0 +1,22 @@ + +FROM openjdk:17-jdk-alpine as stage1 + +WORKDIR /app + +COPY gradlew . + +COPY gradle gradle +COPY src src +COPY build.gradle . +COPY settings.gradle . + +RUN chmod 777 gradlew +RUN ./gradlew bootJar + +# 두 번째 스테이지 +FROM openjdk:17-jdk-alpine +WORKDIR /app + +COPY --from=stage1 /app/build/libs/*.jar app.jar + +ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar", "app.jar"] \ No newline at end of file diff --git a/backend/apigateway/k8s/apigateway-depl.yml b/backend/apigateway/k8s/apigateway-depl.yml index edeb1cb5..b607cb4b 100644 --- a/backend/apigateway/k8s/apigateway-depl.yml +++ b/backend/apigateway/k8s/apigateway-depl.yml @@ -2,21 +2,21 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: live-deployment + name: apigateway-deployment spec: replicas: 1 selector: matchLabels: - app: live + app: apigateway template: metadata: labels: - app: live + app: apigateway spec: containers: - - name: live + - name: apigateway # aws의 ecr 주소 사용 image: 676206947506.dkr.ecr.ap-northeast-2.amazonaws.com/inong/apigateway:latest ports: @@ -45,18 +45,4 @@ spec: valueFrom: secretKeyRef: key: JWT_TOKEN_REFRESH_EXPIRATION_TIME - name: inong-app-secrets - readinessProbe: - httpGet: - path: /live/healthcheck - port: 8080 - # 컨테이너 시작 후 지연 시간 설정 - initialDelaySeconds: 10 - # 확인 반복 주기 - periodSeconds: 10 - # 요청 타임아웃 설정 - timeoutSeconds: 1 # 1초 이내에 안오면 실패로 간주 - # 성공 인식 횟수 설정. 몇번을 성공해야 성공으로 간주할거냐 - successThreshold: 1 - # 연속 실패 횟수: 연속적으로 5번을 실패하면 건강하지 않은 상태로 판단하여 기존 서버 종료시키지 않음 - failureThreshold: 5 \ No newline at end of file + name: inong-app-secrets \ No newline at end of file diff --git a/backend/apigateway/k8s/apigateway-service.yml b/backend/apigateway/k8s/apigateway-service.yml index bcd9c9cc..862c61a0 100644 --- a/backend/apigateway/k8s/apigateway-service.yml +++ b/backend/apigateway/k8s/apigateway-service.yml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: live-service + name: apigateway-service spec: # ingress를 적용하기 위해 ClusterIP로 변경 @@ -13,4 +13,4 @@ spec: targetPort: 8080 # pod 포트 # depl의 labels와 맞아야 함 ⭐ selector: - app: live \ No newline at end of file + app: apigateway \ No newline at end of file From 7f1ea95da82514b875bbd8cf15b402b9d6cbf7ed Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 16:07:48 +0900 Subject: [PATCH 03/15] chore --- backend/discovery/build.gradle | 2 +- .../src/main/java/org/samtuap/inong/DiscoveryApplication.java | 4 ++-- backend/live/build.gradle | 2 +- backend/member/build.gradle | 2 +- backend/order/build.gradle | 2 +- backend/product/build.gradle | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/discovery/build.gradle b/backend/discovery/build.gradle index cdfef812..ecb35923 100644 --- a/backend/discovery/build.gradle +++ b/backend/discovery/build.gradle @@ -28,7 +28,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' -// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server' + implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server' } dependencyManagement { diff --git a/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java b/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java index 470b36ce..91a6eba9 100644 --- a/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java +++ b/backend/discovery/src/main/java/org/samtuap/inong/DiscoveryApplication.java @@ -3,12 +3,12 @@ import jakarta.annotation.PostConstruct; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -//import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; +import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; import java.util.TimeZone; @SpringBootApplication -//@EnableEurekaServer +@EnableEurekaServer public class DiscoveryApplication { public static void main(String[] args) { diff --git a/backend/live/build.gradle b/backend/live/build.gradle index 0accb13f..97be38c9 100644 --- a/backend/live/build.gradle +++ b/backend/live/build.gradle @@ -31,7 +31,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' -// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' + implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/member/build.gradle b/backend/member/build.gradle index 7db3c5f9..5c43714a 100644 --- a/backend/member/build.gradle +++ b/backend/member/build.gradle @@ -34,7 +34,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' -// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' + implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/order/build.gradle b/backend/order/build.gradle index 9d7e1be4..309623b4 100644 --- a/backend/order/build.gradle +++ b/backend/order/build.gradle @@ -32,7 +32,7 @@ dependencies { runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' implementation 'io.jsonwebtoken:jjwt:0.9.1' -// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' + implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/product/build.gradle b/backend/product/build.gradle index fc1ad8e9..0a987abd 100644 --- a/backend/product/build.gradle +++ b/backend/product/build.gradle @@ -29,7 +29,7 @@ dependencies { runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' -// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' + implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' implementation 'org.mindrot:jbcrypt:0.4' From e7af915b379d875d007d126bff5608ebf93c08ce Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 16:16:35 +0900 Subject: [PATCH 04/15] chore --- .github/workflows/deploy_msa_k8s.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_msa_k8s.yml b/.github/workflows/deploy_msa_k8s.yml index 9372d097..cbcbafd2 100644 --- a/.github/workflows/deploy_msa_k8s.yml +++ b/.github/workflows/deploy_msa_k8s.yml @@ -98,5 +98,5 @@ jobs: - name: eks kubectl apply run: | - kubectl apply -f ./backend/live/k8s/apigateway-depl.yml + kubectl apply -f ./backend/apigateway/k8s/apigateway-depl.yml kubectl rollout restart deployment apigateway-deployment \ No newline at end of file From 7bd1a648e968c902a1bfd50215e54d5dae76be51 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 16:35:21 +0900 Subject: [PATCH 05/15] =?UTF-8?q?chore:=20application-prod=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/apigateway/.gitignore | 1 + .../src/main/resources/application-prod.yml | 2 +- .../src/main/resources/application-prod.yml | 9 +++++++- .../src/main/resources/application-prod.yml | 21 +++++++------------ .../src/main/resources/application-prod.yml | 9 +++++++- .../src/main/resources/application-prod.yml | 6 ++++++ 6 files changed, 32 insertions(+), 16 deletions(-) diff --git a/backend/apigateway/.gitignore b/backend/apigateway/.gitignore index 0b17f470..9b3342ff 100644 --- a/backend/apigateway/.gitignore +++ b/backend/apigateway/.gitignore @@ -38,3 +38,4 @@ out/ ## secret src/main/resources/application-secret.properties +src/main/resources/application.yml \ No newline at end of file diff --git a/backend/apigateway/src/main/resources/application-prod.yml b/backend/apigateway/src/main/resources/application-prod.yml index 5bea45c4..35a53c5a 100644 --- a/backend/apigateway/src/main/resources/application-prod.yml +++ b/backend/apigateway/src/main/resources/application-prod.yml @@ -4,7 +4,7 @@ spring: config: activate: on-profile: prod - import: application-secret.properties +# import: application-secret.properties application: name: api-gateway cloud: diff --git a/backend/live/src/main/resources/application-prod.yml b/backend/live/src/main/resources/application-prod.yml index 67a8d91c..52499404 100644 --- a/backend/live/src/main/resources/application-prod.yml +++ b/backend/live/src/main/resources/application-prod.yml @@ -53,4 +53,11 @@ jwt: secret_key: ${JWT_SECRET_KEY} token: access_expiration_time: ${JWT_TOKEN_ACCESS_EXPIRATION_TIME} - refresh_expiration_time: ${JWT_TOKEN_REFRESH_EXPIRATION_TIME} \ No newline at end of file + refresh_expiration_time: ${JWT_TOKEN_REFRESH_EXPIRATION_TIME} + +# 유레카를 등록 및 활성화 안하도록 +eureka: + client: + enabled: false + registerWithEureka: false + fetchRegistry: false \ No newline at end of file diff --git a/backend/member/src/main/resources/application-prod.yml b/backend/member/src/main/resources/application-prod.yml index 3b7f432f..57e0155b 100644 --- a/backend/member/src/main/resources/application-prod.yml +++ b/backend/member/src/main/resources/application-prod.yml @@ -71,17 +71,12 @@ jwt: access_expiration_time: ${JWT_TOKEN_ACCESS_EXPIRATION_TIME} refresh_expiration_time: ${JWT_TOKEN_REFRESH_EXPIRATION_TIME} -### swagger -#springdoc: -# api-docs: -# path: /member-service/v3/api-docs -# swagger-ui: -# path: /member-service/swagger-ui.html -# -#openapi: -# service: -# # API Gateway port -# url: http://localhost:8080 - fcm: - secret-file: ${FCM_SECRET_FILE} \ No newline at end of file + secret-file: ${FCM_SECRET_FILE} + +# 유레카를 등록 및 활성화 안하도록 +eureka: + client: + enabled: false + registerWithEureka: false + fetchRegistry: false \ No newline at end of file diff --git a/backend/order/src/main/resources/application-prod.yml b/backend/order/src/main/resources/application-prod.yml index cd655cb4..bb719f42 100644 --- a/backend/order/src/main/resources/application-prod.yml +++ b/backend/order/src/main/resources/application-prod.yml @@ -47,4 +47,11 @@ portone: api-secret: ${PORTONE_KAKAO_API_SECRET} payment-prefix: ${PORTONE_PAYMENT_PREFIX} store-id: ${PORTONE_STORE_ID} - channel-key: ${PORTONE_CHANNELKEY} \ No newline at end of file + channel-key: ${PORTONE_CHANNELKEY} + +# 유레카를 등록 및 활성화 안하도록 +eureka: + client: + enabled: false + registerWithEureka: false + fetchRegistry: false \ No newline at end of file diff --git a/backend/product/src/main/resources/application-prod.yml b/backend/product/src/main/resources/application-prod.yml index 5db7e993..0af4f40b 100644 --- a/backend/product/src/main/resources/application-prod.yml +++ b/backend/product/src/main/resources/application-prod.yml @@ -80,3 +80,9 @@ cloud: stack: auto: false +# 유레카를 등록 및 활성화 안하도록 +eureka: + client: + enabled: false + registerWithEureka: false + fetchRegistry: false From ceff6fff1b30f3f80c4622143a084a95c205f5dd Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 16:47:03 +0900 Subject: [PATCH 06/15] =?UTF-8?q?chore:=20eureka=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=EC=84=B1=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/apigateway/build.gradle | 2 +- backend/live/build.gradle | 2 +- backend/live/src/main/resources/application-prod.yml | 9 +-------- backend/member/build.gradle | 2 +- backend/member/src/main/resources/application-prod.yml | 9 +-------- backend/order/build.gradle | 2 +- backend/order/src/main/resources/application-prod.yml | 7 ------- backend/product/build.gradle | 2 +- backend/product/src/main/resources/application-prod.yml | 7 ------- 9 files changed, 7 insertions(+), 35 deletions(-) diff --git a/backend/apigateway/build.gradle b/backend/apigateway/build.gradle index 76b2d18b..e0d94d33 100644 --- a/backend/apigateway/build.gradle +++ b/backend/apigateway/build.gradle @@ -24,7 +24,7 @@ ext { dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/backend/live/build.gradle b/backend/live/build.gradle index 97be38c9..0accb13f 100644 --- a/backend/live/build.gradle +++ b/backend/live/build.gradle @@ -31,7 +31,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/live/src/main/resources/application-prod.yml b/backend/live/src/main/resources/application-prod.yml index 52499404..67a8d91c 100644 --- a/backend/live/src/main/resources/application-prod.yml +++ b/backend/live/src/main/resources/application-prod.yml @@ -53,11 +53,4 @@ jwt: secret_key: ${JWT_SECRET_KEY} token: access_expiration_time: ${JWT_TOKEN_ACCESS_EXPIRATION_TIME} - refresh_expiration_time: ${JWT_TOKEN_REFRESH_EXPIRATION_TIME} - -# 유레카를 등록 및 활성화 안하도록 -eureka: - client: - enabled: false - registerWithEureka: false - fetchRegistry: false \ No newline at end of file + refresh_expiration_time: ${JWT_TOKEN_REFRESH_EXPIRATION_TIME} \ No newline at end of file diff --git a/backend/member/build.gradle b/backend/member/build.gradle index 5c43714a..7db3c5f9 100644 --- a/backend/member/build.gradle +++ b/backend/member/build.gradle @@ -34,7 +34,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/member/src/main/resources/application-prod.yml b/backend/member/src/main/resources/application-prod.yml index 57e0155b..e863e860 100644 --- a/backend/member/src/main/resources/application-prod.yml +++ b/backend/member/src/main/resources/application-prod.yml @@ -72,11 +72,4 @@ jwt: refresh_expiration_time: ${JWT_TOKEN_REFRESH_EXPIRATION_TIME} fcm: - secret-file: ${FCM_SECRET_FILE} - -# 유레카를 등록 및 활성화 안하도록 -eureka: - client: - enabled: false - registerWithEureka: false - fetchRegistry: false \ No newline at end of file + secret-file: ${FCM_SECRET_FILE} \ No newline at end of file diff --git a/backend/order/build.gradle b/backend/order/build.gradle index 309623b4..9d7e1be4 100644 --- a/backend/order/build.gradle +++ b/backend/order/build.gradle @@ -32,7 +32,7 @@ dependencies { runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' implementation 'io.jsonwebtoken:jjwt:0.9.1' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' diff --git a/backend/order/src/main/resources/application-prod.yml b/backend/order/src/main/resources/application-prod.yml index bb719f42..02aca255 100644 --- a/backend/order/src/main/resources/application-prod.yml +++ b/backend/order/src/main/resources/application-prod.yml @@ -48,10 +48,3 @@ portone: payment-prefix: ${PORTONE_PAYMENT_PREFIX} store-id: ${PORTONE_STORE_ID} channel-key: ${PORTONE_CHANNELKEY} - -# 유레카를 등록 및 활성화 안하도록 -eureka: - client: - enabled: false - registerWithEureka: false - fetchRegistry: false \ No newline at end of file diff --git a/backend/product/build.gradle b/backend/product/build.gradle index 0a987abd..fc1ad8e9 100644 --- a/backend/product/build.gradle +++ b/backend/product/build.gradle @@ -29,7 +29,7 @@ dependencies { runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' - implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +// implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.kafka:spring-kafka' implementation 'org.mindrot:jbcrypt:0.4' diff --git a/backend/product/src/main/resources/application-prod.yml b/backend/product/src/main/resources/application-prod.yml index 0af4f40b..1da05b4e 100644 --- a/backend/product/src/main/resources/application-prod.yml +++ b/backend/product/src/main/resources/application-prod.yml @@ -79,10 +79,3 @@ cloud: auto: false stack: auto: false - -# 유레카를 등록 및 활성화 안하도록 -eureka: - client: - enabled: false - registerWithEureka: false - fetchRegistry: false From 0d99538ca013afdc9c88d7ddf33be02b936f0cf4 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 16:54:07 +0900 Subject: [PATCH 07/15] =?UTF-8?q?chore:=20=EC=9C=A0=EB=A0=88=EC=B9=B4=20?= =?UTF-8?q?=EC=9D=98=EC=A1=B4=EC=84=B1=20=EB=B9=BC=EA=B3=A0=20=EC=83=9D?= =?UTF-8?q?=EA=B8=B4=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0>xstream=20?= =?UTF-8?q?=EC=9D=98=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/member/build.gradle | 2 ++ backend/product/build.gradle | 2 ++ 2 files changed, 4 insertions(+) diff --git a/backend/member/build.gradle b/backend/member/build.gradle index 7db3c5f9..50c721d6 100644 --- a/backend/member/build.gradle +++ b/backend/member/build.gradle @@ -47,6 +47,8 @@ dependencies { // fcm implementation 'com.google.firebase:firebase-admin:9.3.0' + implementation 'com.thoughtworks.xstream:xstream:1.4.20' + } dependencyManagement { diff --git a/backend/product/build.gradle b/backend/product/build.gradle index fc1ad8e9..ec8cf3d7 100644 --- a/backend/product/build.gradle +++ b/backend/product/build.gradle @@ -65,6 +65,8 @@ dependencies { // redis shedlock implementation 'net.javacrumbs.shedlock:shedlock-spring:4.44.0' implementation 'net.javacrumbs.shedlock:shedlock-provider-redis-spring:4.44.0' + + implementation 'com.thoughtworks.xstream:xstream:1.4.20' } tasks.named('test') { From 5b941b4ecf913990a7431076ecbaeb7bb8915f55 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 17:49:53 +0900 Subject: [PATCH 08/15] =?UTF-8?q?chore:=20=EB=9D=BC=EC=9D=B4=EB=B8=8C=20?= =?UTF-8?q?=EC=B9=B4=ED=94=84=EC=B9=B4=20=EB=A1=9C=EC=BB=AC=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/samtuap/inong/domain/chat/kafka/KafkaConstants.java | 2 +- .../inong/domain/chat/kafka/KafkaConsumerConfig.java | 6 +++++- .../inong/domain/chat/kafka/KafkaProducerConfig.java | 6 +++++- .../inong/domain/notification/service/FcmService.java | 1 - 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConstants.java b/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConstants.java index 76f21e44..c3259e70 100644 --- a/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConstants.java +++ b/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConstants.java @@ -3,5 +3,5 @@ public class KafkaConstants { public static final String KAFKA_TOPIC = "kafka-chat"; public static final String GROUP_ID = "dongsanginong"; - public static final String KAFKA_BROKER = "localhost:9092"; +// public static final String KAFKA_BROKER = "localhost:9092"; } \ No newline at end of file diff --git a/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConsumerConfig.java b/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConsumerConfig.java index b5791ba9..2e869f9a 100644 --- a/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConsumerConfig.java +++ b/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaConsumerConfig.java @@ -3,6 +3,7 @@ import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.common.serialization.StringDeserializer; import org.samtuap.inong.domain.chat.dto.ChatMessageRequest; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory; import org.springframework.kafka.core.ConsumerFactory; @@ -15,6 +16,9 @@ public class KafkaConsumerConfig { + @Value("${spring.kafka.bootstrap-servers}") + private String KAFKA_HOST; + @Bean ConcurrentKafkaListenerContainerFactory kafkaListenerContainerFactory() { ConcurrentKafkaListenerContainerFactory factory = new ConcurrentKafkaListenerContainerFactory<>(); @@ -38,7 +42,7 @@ public ConsumerFactory consumerFactory() { @Bean public Map consumerConfigurations() { Map configurations = new HashMap<>(); - configurations.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, KafkaConstants.KAFKA_BROKER); + configurations.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, KAFKA_HOST); configurations.put(ConsumerConfig.GROUP_ID_CONFIG, KafkaConstants.GROUP_ID); configurations.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, ErrorHandlingDeserializer.class); configurations.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JsonDeserializer.class); diff --git a/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaProducerConfig.java b/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaProducerConfig.java index b3056e2f..134bdfd2 100644 --- a/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaProducerConfig.java +++ b/backend/live/src/main/java/org/samtuap/inong/domain/chat/kafka/KafkaProducerConfig.java @@ -2,6 +2,7 @@ import org.apache.kafka.common.serialization.StringSerializer; import org.samtuap.inong.domain.chat.dto.ChatMessageRequest; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.kafka.annotation.EnableKafka; @@ -17,6 +18,9 @@ @Configuration public class KafkaProducerConfig { + @Value("${spring.kafka.bootstrap-servers}") + private String KAFKA_HOST; + @Bean public ProducerFactory producerFactory() { return new DefaultKafkaProducerFactory<>(producerConfigurations()); @@ -25,7 +29,7 @@ public ProducerFactory producerFactory() { @Bean public Map producerConfigurations() { Map configurations = new HashMap<>(); - configurations.put(org.apache.kafka.clients.producer.ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, KafkaConstants.KAFKA_BROKER); + configurations.put(org.apache.kafka.clients.producer.ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, KAFKA_HOST); configurations.put(org.apache.kafka.clients.producer.ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class); configurations.put(org.apache.kafka.clients.producer.ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class); return configurations; diff --git a/backend/member/src/main/java/org/samtuap/inong/domain/notification/service/FcmService.java b/backend/member/src/main/java/org/samtuap/inong/domain/notification/service/FcmService.java index 41ba0fb3..fbba829b 100644 --- a/backend/member/src/main/java/org/samtuap/inong/domain/notification/service/FcmService.java +++ b/backend/member/src/main/java/org/samtuap/inong/domain/notification/service/FcmService.java @@ -6,7 +6,6 @@ import com.google.firebase.messaging.Message; import com.google.firebase.messaging.WebpushConfig; import com.google.firebase.messaging.WebpushNotification; -import com.thoughtworks.xstream.core.BaseException; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.samtuap.inong.common.exception.BaseCustomException; From 17ac71bf5fd828444501791bec3c8b4a3234de19 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 19:30:26 +0900 Subject: [PATCH 09/15] chore --- backend/live/src/main/resources/application-prod.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/live/src/main/resources/application-prod.yml b/backend/live/src/main/resources/application-prod.yml index 67a8d91c..1f0d0a78 100644 --- a/backend/live/src/main/resources/application-prod.yml +++ b/backend/live/src/main/resources/application-prod.yml @@ -35,6 +35,8 @@ spring: key-deserializer: org.apache.kafka.common.serialization.StringDeserializer value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer properties: + socket.connection.setup.timeout.ms: 60000 + socket.connection.setup.timeout.max.ms: 60000 spring: json: trusted: From 5344db3427a57efb8aba2a5696726d0f2e9e9086 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Tue, 29 Oct 2024 21:37:16 +0900 Subject: [PATCH 10/15] chore --- .github/workflows/deploy_msa_k8s.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_msa_k8s.yml b/.github/workflows/deploy_msa_k8s.yml index cbcbafd2..6bcc0633 100644 --- a/.github/workflows/deploy_msa_k8s.yml +++ b/.github/workflows/deploy_msa_k8s.yml @@ -5,6 +5,7 @@ on: branches: - develop + jobs: build-and-deploy: runs-on: ubuntu-latest From 432d275b24122316d2fc98a7d909ad715234a768 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Wed, 30 Oct 2024 09:58:53 +0900 Subject: [PATCH 11/15] chore --- backend/member/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/member/Dockerfile b/backend/member/Dockerfile index 6494c127..df3e9d78 100644 --- a/backend/member/Dockerfile +++ b/backend/member/Dockerfile @@ -1,4 +1,3 @@ - FROM openjdk:17-jdk-alpine as stage1 WORKDIR /app From eb21c46f4042061df700c24a164a0c747c3e051a Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Wed, 30 Oct 2024 10:07:44 +0900 Subject: [PATCH 12/15] =?UTF-8?q?chore:=20deploy=5Fmsa=5Fk8s=5Fyml=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 --- .github/workflows/deploy_msa_k8s.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_msa_k8s.yml b/.github/workflows/deploy_msa_k8s.yml index 6bcc0633..99097108 100644 --- a/.github/workflows/deploy_msa_k8s.yml +++ b/.github/workflows/deploy_msa_k8s.yml @@ -43,6 +43,11 @@ jobs: -f ./backend/product/Dockerfile ./backend/product docker push $REGISTRY/$REPOSITORY:latest + - name: eks kubectl apply + run: | + kubectl apply -f ./backend/product/k8s/product-depl.yml + kubectl rollout restart deployment product-deployment + # member - name: build and push docker member images to ecr env: @@ -69,8 +74,8 @@ jobs: docker push $REGISTRY/$REPOSITORY:latest - name: eks kubectl apply run: | - kubectl apply -f ./backend/product/k8s/product-depl.yml - kubectl rollout restart deployment product-deployment + kubectl apply -f ./backend/order/k8s/order-depl.yml + kubectl rollout restart deployment order-deployment # live - name: build and push docker live images to ecr From d813c892b511989838dc2f358a380e93dcc24313 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Wed, 30 Oct 2024 12:03:25 +0900 Subject: [PATCH 13/15] =?UTF-8?q?chore:=20depl.yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/live/k8s/live-depl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/live/k8s/live-depl.yml b/backend/live/k8s/live-depl.yml index ab3c7fef..59a7888b 100644 --- a/backend/live/k8s/live-depl.yml +++ b/backend/live/k8s/live-depl.yml @@ -79,7 +79,7 @@ spec: #무중단 배포를 위한 컨테이너 헬스체크 readinessProbe: httpGet: - path: /live-service/live/healthcheck + path: /live/healthcheck port: 8080 # 컨테이너 시작 후 지연 시간 설정 initialDelaySeconds: 20 From 916f6facbd9f4700a71961a08046b3aa0dcd42ca Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Wed, 30 Oct 2024 12:54:42 +0900 Subject: [PATCH 14/15] =?UTF-8?q?chore:=20server.port=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/live/src/main/resources/application-prod.yml | 2 +- backend/member/k8s/member-depl.yml | 2 +- backend/member/src/main/resources/application-prod.yml | 2 +- backend/order/k8s/order-depl.yml | 2 +- backend/order/src/main/resources/application-prod.yml | 2 +- backend/product/k8s/product-depl.yml | 2 +- backend/product/src/main/resources/application-prod.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/live/src/main/resources/application-prod.yml b/backend/live/src/main/resources/application-prod.yml index 1f0d0a78..1976b63d 100644 --- a/backend/live/src/main/resources/application-prod.yml +++ b/backend/live/src/main/resources/application-prod.yml @@ -1,5 +1,5 @@ server: - port: 0 + port: 8080 spring: config: diff --git a/backend/member/k8s/member-depl.yml b/backend/member/k8s/member-depl.yml index 8142a21a..54fbc98d 100644 --- a/backend/member/k8s/member-depl.yml +++ b/backend/member/k8s/member-depl.yml @@ -144,7 +144,7 @@ spec: #무중단 배포를 위한 컨테이너 헬스체크 readinessProbe: httpGet: - path: /member-service/member/healthcheck + path: /member/healthcheck port: 8080 # 컨테이너 시작 후 지연 시간 설정 initialDelaySeconds: 20 diff --git a/backend/member/src/main/resources/application-prod.yml b/backend/member/src/main/resources/application-prod.yml index e863e860..089197f8 100644 --- a/backend/member/src/main/resources/application-prod.yml +++ b/backend/member/src/main/resources/application-prod.yml @@ -1,5 +1,5 @@ server: - port: 0 + port: 8080 spring: config: diff --git a/backend/order/k8s/order-depl.yml b/backend/order/k8s/order-depl.yml index d0516d0a..228f93d9 100644 --- a/backend/order/k8s/order-depl.yml +++ b/backend/order/k8s/order-depl.yml @@ -79,7 +79,7 @@ spec: #무중단 배포를 위한 컨테이너 헬스체크 readinessProbe: httpGet: - path: /order-service/order/healthcheck + path: /order/healthcheck port: 8080 # 컨테이너 시작 후 지연 시간 설정 initialDelaySeconds: 20 diff --git a/backend/order/src/main/resources/application-prod.yml b/backend/order/src/main/resources/application-prod.yml index 02aca255..a3c8651a 100644 --- a/backend/order/src/main/resources/application-prod.yml +++ b/backend/order/src/main/resources/application-prod.yml @@ -1,5 +1,5 @@ server: - port: 0 + port: 8080 spring: config: diff --git a/backend/product/k8s/product-depl.yml b/backend/product/k8s/product-depl.yml index b9fbd589..ce72a214 100644 --- a/backend/product/k8s/product-depl.yml +++ b/backend/product/k8s/product-depl.yml @@ -104,7 +104,7 @@ spec: #무중단 배포를 위한 컨테이너 헬스체크 readinessProbe: httpGet: - path: /product-service/product/healthcheck + path: /product/healthcheck port: 8080 # 컨테이너 시작 후 지연 시간 설정 initialDelaySeconds: 20 diff --git a/backend/product/src/main/resources/application-prod.yml b/backend/product/src/main/resources/application-prod.yml index 1da05b4e..c86ff7fe 100644 --- a/backend/product/src/main/resources/application-prod.yml +++ b/backend/product/src/main/resources/application-prod.yml @@ -1,5 +1,5 @@ server: - port: 0 + port: 8080 spring: config: activate: From edc3dc8795c6ee7192c50c4da24e209e57e7cd49 Mon Sep 17 00:00:00 2001 From: H-Yeji Date: Wed, 30 Oct 2024 14:25:04 +0900 Subject: [PATCH 15/15] =?UTF-8?q?chore:=20=EA=B3=A0=EC=9C=A0=ED=95=9C=20gr?= =?UTF-8?q?oup-instance-id=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/live/src/main/resources/application-prod.yml | 1 + backend/member/src/main/resources/application-prod.yml | 1 + backend/order/src/main/resources/application-prod.yml | 1 + backend/product/src/main/resources/application-prod.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/backend/live/src/main/resources/application-prod.yml b/backend/live/src/main/resources/application-prod.yml index 1976b63d..4be82e5f 100644 --- a/backend/live/src/main/resources/application-prod.yml +++ b/backend/live/src/main/resources/application-prod.yml @@ -31,6 +31,7 @@ spring: bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS} consumer: group-id: live-group + group-instance-id: ${HOSTNAME}-instance auto-offset-reset: earliest key-deserializer: org.apache.kafka.common.serialization.StringDeserializer value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer diff --git a/backend/member/src/main/resources/application-prod.yml b/backend/member/src/main/resources/application-prod.yml index 089197f8..01fc46e8 100644 --- a/backend/member/src/main/resources/application-prod.yml +++ b/backend/member/src/main/resources/application-prod.yml @@ -35,6 +35,7 @@ spring: bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS} consumer: group-id: member-group + group-instance-id: ${HOSTNAME}-instance auto-offset-reset: earliest logging: diff --git a/backend/order/src/main/resources/application-prod.yml b/backend/order/src/main/resources/application-prod.yml index a3c8651a..f0da158b 100644 --- a/backend/order/src/main/resources/application-prod.yml +++ b/backend/order/src/main/resources/application-prod.yml @@ -35,6 +35,7 @@ spring: bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS} consumer: group-id: order-group + group-instance-id: ${HOSTNAME}-instance auto-offset-reset: earliest logging: diff --git a/backend/product/src/main/resources/application-prod.yml b/backend/product/src/main/resources/application-prod.yml index c86ff7fe..a92cd4a3 100644 --- a/backend/product/src/main/resources/application-prod.yml +++ b/backend/product/src/main/resources/application-prod.yml @@ -31,6 +31,7 @@ spring: bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS} consumer: group-id: product-group + group-instance-id: ${HOSTNAME}-instance auto-offset-reset: earliest data: redis: