Skip to content

[CHORE] 인프라 수정#348

Merged
unifolio0 merged 1 commit intodevelopfrom
feat/#347
Apr 1, 2026
Merged

[CHORE] 인프라 수정#348
unifolio0 merged 1 commit intodevelopfrom
feat/#347

Conversation

@unifolio0
Copy link
Copy Markdown
Contributor

closed #347

작업 내용

스크린샷

참고 사항

@unifolio0 unifolio0 self-assigned this Apr 1, 2026
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이번 변경 사항은 프로덕션 환경의 인프라 구성을 최적화하고 네트워크 설정을 표준화하는 것을 목적으로 합니다. 불필요한 서비스를 정리하고 서비스 간의 통신 경로를 명확히 하여 인프라 관리의 효율성을 높였습니다.

Highlights

  • 네트워크 설정 변경: Docker Compose 설정에서 네트워크 이름을 'prod-kokomen-net'에서 'api-net'으로 변경하였습니다.
  • Redis 서비스 제거: docker-compose-prod.yml 파일에서 kokomen-redis 서비스와 관련 볼륨 설정을 제거하였습니다.
  • Promtail 연결 주소 업데이트: Promtail 설정에서 Loki 서버의 연결 주소를 도메인 기반에서 고정 IP 주소로 변경하였습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


컨테이너들 길을 찾아 헤매다, api-net으로 모여드네. 불필요한 레디스는 떠나보내고, 로그는 고정된 IP로 흐르네.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Summary by CodeRabbit

출시 노트

  • Chores
    • 프로덕션 환경의 네트워크 설정을 단일 공유 네트워크로 통합했습니다.
    • 프로덕션 환경에서 Redis 서비스 및 관련 저장소를 제거했습니다.
    • 로그 수집 서비스의 대상 주소를 업데이트했습니다.

개요

프로덕션 Docker Compose 설정에서 Redis 서비스를 제거하고 네트워크를 통합했습니다. 기존 prod-kokomen-netapi-net으로 변경하여 모든 서비스를 단일 네트워크로 통합했으며, Promtail의 로그 푸시 대상 주소를 업데이트했습니다.

변경사항

응집된 파일 그룹 요약
Docker Compose 프로덕션 설정
docker/prod/api/docker-compose-prod.yml
Redis 서비스 및 관련 볼륨 제거, prod-kokomen-net 네트워크를 api-net으로 변경하여 4개 서비스(kokomen-interview-api-prod, nginx, node, promtail) 통합, 새로운 bridge 드라이버 네트워크 정의 추가
Promtail 로깅 설정
docker/prod/api/promtail/promtail.yaml
Loki 푸시 클라이언트 URL을 http://loki:3100에서 http://10.0.1.196:3100으로 변경하여 고정 IP 주소 기반 통신으로 업데이트

예상 코드 리뷰 난이도

🎯 2 (간단함) | ⏱️ ~10분

검토자 제안

  • nak-honest
  • kargowild

축하 시

🐰 Redis는 이제 네트워크에서 사라지고,
모든 서비스가 api-net에 모여,
Promtail은 고정 주소로 로그를 날리니,
인프라 정리 완료! 깔끔하게 통합되었네! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive 연결된 이슈 #347은 '[CHORE] 인프라 수정'이라는 제목만 있고 구체적인 요구사항이나 작업 항목이 정의되어 있지 않습니다. 실제 변경사항(Docker 네트워크 통합, Redis 제거)과 이슈 사이의 연결을 확인할 수 없습니다. 이슈 #347에 구체적인 요구사항과 작업 목표를 명시하여 변경사항이 의도된 목표를 충족하는지 검증하십시오.
Out of Scope Changes check ❓ Inconclusive Docker Compose 설정 변경(네트워크 통합, Redis 서비스 제거) 및 Promtail 설정 변경이 Docker 인프라 수정과 관련이 있으나, 이슈에서 구체적인 범위가 정의되지 않아 정확한 범위 평가가 어렵습니다. 이슈 #347에서 예상되는 인프라 변경의 구체적인 범위를 정의하여 모든 변경사항이 의도된 범위 내인지 확인하십시오.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 풀 리퀘스트의 주요 변경사항을 명확하게 설명하고 있습니다. 인프라 수정이라는 일반적인 표현이지만 변경사항과 관련이 있습니다.
Description check ✅ Passed 풀 리퀘스트 설명이 매우 최소한의 형식만 제공되고 있으나, 이슈 #347을 참조하고 있어 변경사항과 관련이 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#347

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the production Docker Compose configuration by renaming the network to api-net, removing the kokomen-redis service and its associated volume, and changing the network driver from external to a standard bridge. Additionally, the Promtail configuration was updated to use a specific IP address for the Loki server. Feedback was provided regarding the hardcoded IP address in the Promtail configuration, suggesting the use of environment variables to improve maintainability and flexibility.


clients:
- url: http://loki:3100/loki/api/v1/push
- url: http://10.0.1.196:3100/loki/api/v1/push
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Loki 서버의 주소를 하드코딩된 IP(10.0.1.196)로 변경하셨습니다. 이는 인프라 환경 변화에 취약하며 유지보수성을 떨어뜨립니다. docker-compose-prod.yml에서 promtail 서비스에 -config.expand-env=true 옵션이 활성화되어 있으므로, 환경 변수를 사용하여 주소를 관리하는 것을 권장합니다.

  - url: http://${LOKI_HOST}:3100/loki/api/v1/push

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docker/prod/api/promtail/promtail.yaml`:
- Around line 7-8: The clients URL is hardcoded to
http://10.0.1.196:3100/loki/api/v1/push; change it to use an environment
variable (e.g., LOKI_HOST) so the Loki host/IP is not baked into promtail.yaml.
Update the promtail.yaml clients entry to build the URL from the env var (e.g.,
use ${LOKI_HOST} with the same port and path) and ensure the
docker-compose-prod.yml promtail service defines the LOKI_HOST env var (or
passes it through) so the container can resolve the target dynamically.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 707a2f85-5d5c-4ddb-af00-bf2c21ccb863

📥 Commits

Reviewing files that changed from the base of the PR and between 800fa17 and 8a79add.

📒 Files selected for processing (2)
  • docker/prod/api/docker-compose-prod.yml
  • docker/prod/api/promtail/promtail.yaml

Comment on lines 7 to +8
clients:
- url: http://loki:3100/loki/api/v1/push
- url: http://10.0.1.196:3100/loki/api/v1/push
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

하드코딩된 IP 주소는 유지보수에 취약합니다.

Loki 서버의 IP가 변경되면 이 설정 파일을 수동으로 업데이트해야 합니다. 환경 변수를 사용하면 인프라 변경 시 더 유연하게 대응할 수 있습니다.

♻️ 환경 변수 사용 제안
 clients:
-  - url: http://10.0.1.196:3100/loki/api/v1/push
+  - url: http://${LOKI_HOST}:3100/loki/api/v1/push

docker-compose-prod.yml의 promtail 서비스에 환경 변수 추가:

environment:
  TZ: Asia/Seoul
  HOSTNAME: ${HOSTNAME}
  LOKI_HOST: ${LOKI_HOST}  # 또는 직접 IP 지정
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker/prod/api/promtail/promtail.yaml` around lines 7 - 8, The clients URL
is hardcoded to http://10.0.1.196:3100/loki/api/v1/push; change it to use an
environment variable (e.g., LOKI_HOST) so the Loki host/IP is not baked into
promtail.yaml. Update the promtail.yaml clients entry to build the URL from the
env var (e.g., use ${LOKI_HOST} with the same port and path) and ensure the
docker-compose-prod.yml promtail service defines the LOKI_HOST env var (or
passes it through) so the container can resolve the target dynamically.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Test Results

 48 files   48 suites   1m 26s ⏱️
270 tests 269 ✅ 1 💤 0 ❌
272 runs  271 ✅ 1 💤 0 ❌

Results for commit 8a79add.

@unifolio0 unifolio0 merged commit bafead1 into develop Apr 1, 2026
4 checks passed
@unifolio0 unifolio0 deleted the feat/#347 branch April 1, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] 인프라 수정

1 participant