[AWS] Elastic Beanstalk + Elastic Cache + GithubActions + SpringBoot CI/CD 배포하기 (4)
[AWS] Elastic Beanstalk + Elastic Cache + GithubActions + SpringBoot CI/CD 배포하기 (4)

[AWS] Elastic Beanstalk + Elastic Cache + GithubActions + SpringBoot CI/CD 배포하기 (4)

Tags
AWS
ElasticBeanstalk
ElasticCache
GithubActions
Published
December 23, 2023
Author
lkdcode
Spring Boot 를 AWS 로 배포해보자.
PRJ : Spring Boot (java17
배포 : Elastic Beanstalk
DB : RDS (MySQL) Elastic Cache Redis
CI/CD : GithubAcations
 
이전 포스팅에서 Elastic Cache 를 이용해 Redis 연결에 성공했고, EC2 로 확인했다.
까다로운 설정 부분들은 다 끝이 났다. 간단하게 배포를 해보자!
 

💡 build

springbootprj.xxxxplain.jar 라는 파일을 같이 빌드하지 않기 위해
build.gradle 에 설정한다.
# build.gradle ... jar { enabled = false } ...
notion image
 
빌드. IntelliJ 에서는 위와 같은 경로로 찾을 수 있다.
터미널 명령어는 아래와 같다.(gradle 설치되어있어야함)
$ ./gradlew build
notion image
build 디렉토리가 생성된 것을 확인할 수 있다.
 
build -> libs -> springbootprj-0.0.1-SNAPSHOT.jar 파일을 배포하면 된다.
notion image
 
EB -> 환경 -> 업로드 및 배포
notion image
아까 빌드한 .jar 파일을 선택하고 배포
 
notion image
성공적으로 배포를 완료했다.