20230124~25 - 회고

선을로·2023년 1월 25일
0

회고

목록 보기
17/20

Nginx를 이용한 무중단 배포 작업을 하면서 겪은 문제들

학습회고

  • Amazon Linux 2에서는 yum을 통한 nginx 설치가 지원되지 않는다함.

Amazon Linux 2 설치 가능한 Nginx 찾기

amazon-linux-extras list | grep nginx

Nginx 설치

sudo amazon-linux-extras install -y nginx1

참고: https://freedeveloper.tistory.com/340

  • no main manifest attribute in 에러
    프로젝트 설정에 따라 해결법이 나뉜다는데
    나 같은 경우

    스프링부트 2.5 이상에서 build.gradle로 빌드할 때 jar파일이 2개이상 생기는 문제 때문이었다.

  • 2개의 jar파일 중 plain.jar은 스프링 의존성이 생략된 파일이기 때문에 java -jar로 실행하면 no main manifest attrubute in에러가 발생했던 것.

아래의 명령어를 build.gradle에 추가해서 해결하였다.

jar {
enabled = false
}

참고: https://dongjuppp.tistory.com/87

  • 모든 real 프로퍼티스에
    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57Dialect 방언 설정을 통일 안하고,
  • Dspring 명령어를 쉡스크립트에 작성할 때,
    oauth-properties 등 중요한 프로퍼티스를 빼먹는 실수 때문에 한참 해맸다.

되새김

https://freedeveloper.tistory.com/340
https://dongjuppp.tistory.com/87

0개의 댓글