Skip to content

Commit

Permalink
[Refactor] NGINX set ref1
Browse files Browse the repository at this point in the history
  • Loading branch information
Han-Jeong committed Jan 9, 2024
1 parent e6d9324 commit b18cf97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ source ${ABSDIR}/profile.sh # 해당 코드로 profile.sh 내의 함수 사용
REPOSITORY=/home/ec2-user/app/step3

echo ">>> Build 파일 복사"
echo ">>> cp $REPOSITORY/zip/build/libs/*.jar $REPOSITORY/"
cp $REPOSITORY/zip/*.jar $REPOSITORY/

cp $REPOSITORY/zip/build/libs/*.jar $REPOSITORY/

echo ">>> 새 어플리케이션 배포"
JAR_NAME=$(ls -tr $REPOSITORY/*.jar | tail -n 1) # jar 이름 꺼내오기
Expand All @@ -27,6 +26,6 @@ IDLE_PROFILE=$(find_idle_profile)
echo ">>> $JAR_NAME 를 profile=$IDLE_PROFILE 로 실행합니다."

nohup java -jar \
-Dspring.config.location=classpath:/application.yml,/home/ec2-user/app/application-security.yml,/home/ec2-user/app/application-s3.yml,/home/ec2-user/app/application-real-db.yml,classpath:/application-real.yml, classpath:/application-real1.yml, classpath:/application-real2.yml \
-Dspring.config.location=classpath:/application.yml,/home/ec2-user/app/application-security.yml,/home/ec2-user/app/application-s3.yml,/home/ec2-user/app/application-real-db.yml,classpath:/application-real.yml,classpath:/application-$IDLE_PROFILE.yml \
-Dspring.profiles.active=$IDLE_PROFILE \
$JAR_NAME > $REPOSITORY/nohup.out 2>&1 &
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti
// SWAGGER
.requestMatchers("/swagger-ui/**", "/swagger-resources/**", "/v3/api-docs/**").permitAll()
//profile
.requestMatchers("/api/profiles").permitAll()
.requestMatchers("/profile").permitAll()
// ELSE
//정적 페이지 허가
.requestMatchers("/", "/css/**", "/*.ico", "/error", "/images/**").permitAll() // 임시로 모든 API 허용
Expand Down

0 comments on commit b18cf97

Please sign in to comment.