Repository navigation
Conversation
- deploy.yml: backend-ci 통과 후 GHCR 이미지 빌드, GCP OIDC + IAP SSH로 서버 배포 - deploy/: 서버용 compose(nginx·backend·postgres), nginx 템플릿, 원격 배포 스크립트 - backend-ci.yml: 모든 PR + workflow_call로 트리거 변경 - Fin-BE-test 포크의 배포 설정을 옮기면서 배포 때 DB 초기화(reset.jar)는 뺐다
4 tasks
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.
변경점 👍
Fin-BE-test 포크에서 하던 dev 서버 배포를 이 레포로 옮겼습니다.
mainpush는 dev 서버로,releasepush는 운영 서버로 배포합니다(release브랜치와 운영 서버는 이후에 준비).deploy.yml(신규)ci: 기존backend-ci.yml을 호출합니다. 테스트를 통과해야 다음 단계로 넘어갑니다.build:bootJar→ghcr.io/apptivedev/fin-be:<SHA>로 푸시합니다. Docker Hub 대신 GHCR이라 별도 계정·시크릿이 없습니다.deploy: GCP에 OIDC(Workload Identity Federation) 로 인증합니다. SSH 키를 GitHub에 두지 않고, IAP 터널과 OS Login으로 VM에 접속합니다. 서버에deploy/파일과.env를 복사한 뒤remote-deploy.sh를 실행합니다.deploy/docker-compose.yml: Fin-BE-test의 compose를 옮겼습니다. 바뀐 점은 다음과 같습니다.fin-be로 고정해 기존 DB 볼륨을 그대로 씁니다.127.0.0.1)에만 엽니다. 수집기는 SSH 터널로 접근합니다.nginx/templates/default.conf.template: 도메인(SERVER_NAME)을 환경마다 치환하도록 템플릿으로 바꿨습니다.remote-deploy.sh: 이미지 pull →up -d→ nginx 재시작(backend IP 갱신) → nginx를 거친/api/categories헬스체크. 실패하면 job이 실패하고 backend 로그를 남깁니다.backend-ci.yml: 모든 PR에서 돌도록 paths 필터를 뺐고(나중에 필수 체크로 걸기 위해),mainpush 트리거 대신deploy.yml이 호출하도록 바꿨습니다.docs/implementation/deployment.md(GCP 설정 명령, Environment 변수, 운영 서버 준비, 롤백), README CI 표.테스트 💻
SPRING_PROFILES_ACTIVE=dev,server)/api/categories200, Swagger 200redirect_uri가https://<도메인>/...으로 생성머지 전 체크리스트
deployment.md의 명령)dev변수·시크릿 등록docker compose down(볼륨 유지)/api/categories, Swagger, OAuth 로그인)비고
backend-ci가 두 번 돕니다(PR 트리거와deploy.yml호출).