배포: 프론트 교체를 헬스 게이트 뒤로 - #228
Merged
Merged
Conversation
이전 순서는 compose up → 프론트 빌드·rsync → 헬스 대기였다. 새 백엔드가 부팅에 실패해도(마이그레이션 오류·설정 누락) 새 API 를 전제로 빌드된 프론트가 이미 /var/www 에 나가 있었다 — 실패한 배포가 "죽은 백엔드 + 새 프론트"라는 어긋난 조합을 남기고, 잡 실패를 보고 조사하는 동안에도 그 조합이 라이브다. 헬스 게이트(backend 는 actuator readiness = db·rabbit·s3·aiServer) 뒤로 옮기면 실패 시 프론트는 마지막 정상 버전에 머문다. 프론트 빌드 자체는 CI Frontend 잡이 이미 검증하므로 이 위치에서 새로 실패할 여지는 작다. 함께: 루트 CLAUDE.md 의 RabbitMQ 수치 현행화 (exchange 3→4, 큐 7→15+DLQ 15). 이번에 definitions.json 을 실제 발행 라우팅 키·컨슈머와 전수 대조했고 토폴로지 자체는 완비 상태였다 — exchange 타입(topic/direct)과 와일드카드 바인딩도 정합.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경 — 인프라·배포 축 감사
이번 라운드에서 본 것:
infra/rabbitmq/definitions.jsonvs 실제 발행 라우팅 키·컨슈머.env시크릿 주입chmod 600— 견고결함은 배포 순서 하나다.
문제
새 백엔드가 부팅에 실패해도(마이그레이션 오류, 설정 누락 —
ddl-auto=validate라 매핑 불일치도 부팅 실패다) 새 API 를 전제로 빌드된 프론트는 이미 라이브다. 잡은 실패로 끝나지만 rsync 는 되돌아가지 않는다.결과: 실패한 배포가 "죽은 백엔드 + 새 프론트" 라는 어긋난 조합을 남기고, 팀이 실패를 조사하는 동안에도 그 조합이 사용자에게 서빙된다. 예컨대 #199 같은 배포에서 백엔드가 죽었다면, 탈퇴 화면은 보이는데
DELETE /api/users/me는 존재하지 않는 상태가 된다.수정
헬스 게이트가 실질적이라(backend 는 readiness 그룹) 이 순서면 실패 시 프론트는 마지막 정상 버전에 머문다. 프론트 빌드 자체는 CI 의 Frontend 잡이 매 PR 마다 이미 검증하므로, 게이트 뒤로 옮겨서 빌드 실패가 늦게 발견될 위험은 사실상 없다.
한계 (이 PR 범위 밖)
백엔드 자체는 여전히 in-place 교체라 롤백이 없다 — 새 컨테이너가 unhealthy 면 옛 컨테이너는 이미 사라진 뒤다. 블루그린·이미지 태그 롤백은 self-hosted 단일 호스트 구조를 바꾸는 일이라(워크플로 주석도 "클라우드 이관 시 재설계" 명시) 여기서 다루지 않는다. 이 PR 은 그 한계 안에서 프론트만이라도 정합하게 만드는 최소 수정이다.