chore: 개발 서버 ARM64 마이그레이션 준비 - #332
Merged
Merged
Conversation
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.
📝 요약(Summary)
개발 서버를 t2.micro(x86) → t4g.micro(ARM64)로 옮기기 위한 이미지·배포 파이프라인 정비.
운영 서버는 이번 변경의 영향을 받지 않는다.
ARM64 지원
Dockerfile: 빌드 스테이지를--platform=$BUILDPLATFORM으로 고정. Spring Boot JAR은 아키텍처 독립이므로Gradle 빌드는 러너에서 네이티브로 한 번만 돌고 런타임 스테이지만 타깃별로 만들어진다. 베이스는 jammy로 고정.
deploy/postgres-ko/Dockerfile:postgis/postgis:17-3.5가 amd64 전용이라postgres:17-bookworm+ PGDGpostgresql-17-postgis-3설치로 교체. 이미지는 EC2에서 네이티브 빌드한다.platforms: linux/arm64, 빌드 캐시 ref를buildcache-arm64로 분리.배포 파이프라인
workflow_dispatch에deploy_mode입력 추가 —infrastructure-only는 DB/Redis만 띄우고 멈춘다(이전 중pg_restore용).DEV_ARM64_AUTODEPLOY=true로 해제한다.concurrency: deploy-dev로 동시 실행 방지.--no-deps app으로 앱만 재생성한다(기존에는 서비스명 없이
--force-recreate라 배포마다 PostgreSQL까지 재생성됐다).경로·데이터
~/saerok→/srv/saerok. 데이터는/srv/saerok/data/{postgres,redis}, 백업은/srv/saerok/backup.DB_URL을 시크릿 대신 컨테이너 내부 주소(postgres:5432)로 고정.보안
sub/email,Apple 응답 전체, JWT 예외 메시지가 로그로 나가고 있었다.
127.0.0.1:8080으로만 바인딩하고 Nginx 리버스 프록시 추가. PostgreSQL5432호스트 노출 제거.docker inspect요약만 출력..dockerignore추가 — 빌드 컨텍스트에서.env,.git,docs등 제외.안정성
mem_reservation지정, 로그 로테이션(10m×3), 앱 헬스체크,init: true, postgresstop_grace_period15s→30s.deploy-to-dev-ec2.yml삭제.배포 순서
DEV_ARM64_AUTODEPLOY가 설정되지 않은 상태 확인workflow_dispatch→infrastructure-only로 DB/Redis 기동pg_dump→ 새 서버로pg_restoreworkflow_dispatch→full로 앱 기동, Nginx/DNS 전환DEV_ARM64_AUTODEPLOY=true상세 절차는
docs/dev-t4g-migration-runbook.md참고.💬 공유사항
postgres-ko베이스 교체 후 PostGIS 동작 (postgis_full_version(),location::geography인덱스)✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.