-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add Redis/Kafka boilerplate for distributed environment migration #53
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| services: | ||
| redis: | ||
| image: redis:7-alpine | ||
| container_name: momogo-redis | ||
| ports: | ||
| - "6379:6379" | ||
|
|
||
| kafka: | ||
| image: apache/kafka:3.8.0 | ||
| container_name: momogo-kafka | ||
| ports: | ||
| - "9092:9092" | ||
| environment: | ||
| KAFKA_NODE_ID: 1 | ||
| KAFKA_PROCESS_ROLES: broker,controller | ||
| KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 | ||
| KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 | ||
| KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER | ||
| KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093 | ||
| KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT | ||
| KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT | ||
| KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
|
|
||
| kafka-ui: | ||
| image: provectuslabs/kafka-ui:latest | ||
| container_name: momogo-kafka-ui | ||
| ports: | ||
| - "8090:8080" | ||
| environment: | ||
| KAFKA_CLUSTERS_0_NAME: local | ||
| KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092 | ||
| depends_on: | ||
| - kafka | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,8 +13,8 @@ import { check } from 'k6'; // 응답 결과(200 OK 등) 성공 여부 검증 | |||||||||
| * ============================================================================ | ||||||||||
| */ | ||||||||||
|
|
||||||||||
| // 1. [서버 주소] 현재 배포된 AWS ALB(로드밸런서) 퍼블릭 DNS 주소 | ||||||||||
| export const BASE_URL = 'http://momogo-alb-1906718718.ap-northeast-2.elb.amazonaws.com'; | ||||||||||
| // 1. [서버 주소] EC2 + Nginx (momogo.kro.kr) | ||||||||||
| export const BASE_URL = 'http://momogo.kro.kr'; | ||||||||||
|
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win [심각] 인증 요청에 HTTPS를 사용하세요.
유효한 인증서가 설정된 HTTPS 주소를 사용하세요. 🔐 변경 예시-export const BASE_URL = 'http://momogo.kro.kr';
+export const BASE_URL = 'https://momogo.kro.kr';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 부분은 아직 HTTPS 설정이 되어있지 않습니다. 추후 HTTPS를 구성한 후 해결하도록 하겠습니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
(๑•̀ㅁ•́๑) 응원합니다, 화이팅! You are interacting with an AI system. |
||||||||||
|
|
||||||||||
| // 2. [테스트 계정] ADMIN 권한 + 공간(Space) 소유 계정 | ||||||||||
| export const ADMIN_USER = { | ||||||||||
|
|
@@ -23,8 +23,8 @@ export const ADMIN_USER = { | |||||||||
| }; | ||||||||||
|
|
||||||||||
| // 3. [테스트 대상] ADMIN_USER 소유 공간/카테고리 UUID | ||||||||||
| export const SPACE_ID = '9d683a9a-9e5d-4a7c-9230-b40f7c62d31e'; | ||||||||||
| export const CATEGORY_ID = 'effa0724-42c5-4335-964c-1e2556007e1a'; | ||||||||||
| export const SPACE_ID = '07ddf318-4762-45b4-84e6-ec6be69d4f14'; | ||||||||||
| export const CATEGORY_ID = 'e52067a1-8e66-4ec9-a343-927405c3b69d'; | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * [JWT 인증 토큰 발급 setup 함수] | ||||||||||
|
|
||||||||||
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
[중대] 컨테이너용 Kafka 리스너를 분리하세요.
KAFKA_ADVERTISED_LISTENERS가localhost:9092만 반환합니다. Kafka UI는 메타데이터를 받은 뒤 자기 컨테이너의localhost:9092에 연결합니다. 따라서 Kafka UI가 브로커에 연결하지 못합니다.호스트용 리스너와 Docker 네트워크용 리스너를 분리하세요. Kafka UI는 내부 리스너를 사용해야 합니다.
수정 예시
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 보일러 플레이트용 구성을 한 상태입니다. 추후 kafka 리스너를 구현하고 적용하면서 수정하도록 하겠습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SungHuii, 확인했습니다. 현재 PR의 보일러플레이트 범위에서는 이 항목을 보류하겠습니다.Kafka 리스너를 적용하는 작업 시점에는 호스트용 엔드포인트와 Docker 네트워크용 엔드포인트를 분리해야 합니다. 그렇지 않으면 Kafka UI와 같은 컨테이너 클라이언트가
localhost:9092로 연결을 시도할 수 있습니다.이 작업을 추적할 GitHub 후속 이슈를 생성할까요?
🐇
You are interacting with an AI system.