Skip to content

chore: 개발 서버 포트 loopback 바인딩 및 인프라 문서 정리 - #84

Merged
20210699 merged 3 commits into
developfrom
chore/infra-pi-localhost-bind
Oct 26, 2026
Merged

20210699 merged 3 commits into
developfrom
chore/infra-pi-localhost-bind

Conversation

@20210699

@20210699 20210699 commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

요약

Cloudflare Tunnel(dev-api.stillstar.store, HTTPS) 구성이 끝나서 정리 작업을 한 PR에 모은다(#82 후속).

  1. 개발 서버(pi2) app 포트를 LAN 전체(0.0.0.0:8080)에서 loopback(127.0.0.1:8080)으로 좁힌다. 외부 접근은 터널로만 한다.
  2. PI2_SSH_USER를 Variable로 읽는다. Secret이면 Actions 로그의 "deploy" 단어가 전부 ***로 가려졌다.
  3. 인프라 구성도(docs/infra.md)를 추가하고, 개발 서버 관련 문서를 지금 상태에 맞춘다.

변경 사항

  • deploy/compose.dev.yaml: ports를 0.0.0.0:8080:8080 → 127.0.0.1:8080:8080으로 변경. 운영 compose.prod.yaml은 변경 없음.
  • .github/workflows/cd-dev.yml: PI2_SSH_USER를 secrets.* → vars.*로 변경.
  • docs/infra.md (신규)
    • 환경별 요약표, 런타임 구성도·배포 흐름도(Mermaid).
    • 운영과 개발 배포 비교, 접근 제어 표, GitHub 설정값(이름·종류·사용처, 값은 미포함).
  • README·CLAUDE.md: 기술 스택에 Raspberry Pi·Tailscale·Cloudflare Tunnel 추가, 서버 주소와 infra.md 링크 추가.
  • ADR 0017: 결정 6 "외부 공개는 Cloudflare Tunnel" 추가, 결과에 Cloudflare 의존 추가.
  • 스펙 023
    • Status를 Implemented로 변경(첫 실배포 f909983 성공).
    • 사용자 설정 완료 반영, 실배포 완료 조건 체크.
    • 결정 사항 3(loopback 전환) 갱신.
  • application-dev.yml: 주석만 수정("추후 Cloudflare Tunnel" → 현재 구성).

영향

  • 배포 헬스체크는 영향 없음. Docker healthcheck와 deploy-dev.sh의 compose exec ... curl 모두 컨테이너 내부에서 호출한다.
  • 터널: cloudflared가 pi2 호스트(또는 network_mode: host)에서 localhost:8080으로 프록시해야 계속 동작한다.
  • LAN에서 http://192.168.0.5:8080으로 직접 접근할 수 없게 된다 → https://dev-api.stillstar.store 사용.
  • 바인딩은 머지 후 다음 cd-dev.yml 배포 때 적용된다.

관련 스펙 / 이슈

머지 전 (필수)

  • GitHub Variable PI2_SSH_USER = deploy 등록(Settings → Secrets and variables → Actions → Variables). 없으면 배포가 "vars.PI2_SSH_USER 미설정"으로 실패한다.
  • pi2 cloudflared가 localhost:8080으로 프록시하는지 확인.

머지 후

  • 배포 성공, 로그에 deploy가 가려지지 않고 보이는지 확인.
  • https://dev-api.stillstar.store/actuator/health 정상 응답 확인.
  • 기존 Secret PI2_SSH_USER 삭제(더 이상 사용하지 않음).

체크리스트

  • docker compose config로 host_ip: 127.0.0.1 확인, actionlint 통과, Mermaid 렌더링 확인
  • 필요한 문서/스펙 갱신

🤖 Generated with Claude Code

Cloudflare Tunnel(dev-api.stillstar.store) 구성 완료에 따라 pi2 app 포트를
LAN 전체(0.0.0.0)에서 loopback으로 좁힘. 배포 헬스체크는 컨테이너 내부에서
하므로 영향 없음. 운영 compose는 변경 없음.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f909983 and f7d0893.

Files selected for processing: 2
  • deploy/compose.dev.yaml
  • docs/specs/023-pi-dev-server-deploy.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

개발 서버 앱 포트의 호스트 바인딩을 0.0.0.0:8080에서 127.0.0.1:8080으로 변경했습니다. 문서에는 외부 접근 경로를 Cloudflare Tunnel로 한정하고, 헬스체크는 컨테이너 내부에서 실행한다고 기록했습니다.

Changes: 개발 서버 접근 경로

Layer / File(s) Summary
루프백 바인딩과 접근 경로
deploy/compose.dev.yaml, docs/specs/023-pi-dev-server-deploy.md
Compose 포트를 127.0.0.1:8080에 바인딩합니다. 문서는 Cloudflare Tunnel의 프록시 위치와 대상, LAN 기기의 직접 접근 제한, 컨테이너 내부 헬스체크를 설명합니다.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related issues

Possibly related PRs

  • Central-MakeUs/Rodi-Server#83: 동일한 Compose 포트 바인딩과 배포 스펙을 다루며, 이 변경은 해당 포트의 바인딩 주소와 외부 접근 경로를 갱신합니다.
Merge Risk: Minimal · up to f7d08

The dev app port is now reachable only from the pi2 host, so external access must go through the Cloudflare Tunnel at dev-api.stillstar.store. Before relying on it, confirm on pi2 that cloudflared proxies to localhost:8080, either on the host or with network_mode: host, and that the tunnel's health endpoint responds after the next dev deployment. No repository-level defect was found.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed 제목은 개발 서버 포트의 loopback 바인딩 변경과 인프라 문서 정리를 정확하게 요약합니다. 변경 범위와 주요 목적이 명확합니다.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

20210699 and others added 2 commits October 26, 2026 21:19
PI2_SSH_USER를 secrets → vars로 참조. Secret이면 값("deploy")이 로그에서
전부 ***로 가려져(Copy *** files, ***-dev.sh) 읽기 어려웠다. 비밀값이 아니므로 Variable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs/infra.md: 런타임·배포 구성도(Mermaid), 접근 제어, GitHub 설정값
- README·CLAUDE.md: 기술 스택·서버 주소·문서 링크 갱신
- ADR 0017: Cloudflare Tunnel 외부 공개 결정 추가
- 스펙 023: 첫 실배포 성공·사용자 설정 완료 반영, Implemented

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@20210699 20210699 changed the title chore: 개발 서버 app 포트를 127.0.0.1로 바인딩 chore: 개발 서버 포트 loopback 바인딩 및 인프라 문서 정리 Oct 26, 2026
@20210699
20210699 merged commit 6d20ca5 into develop Oct 26, 2026
2 checks passed
@20210699 20210699 mentioned this pull request Nov 20, 2026
3 tasks done
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.

1 participant