Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ dependencies {
implementation("com.google.firebase:firebase-admin:9.2.0")
implementation("com.squareup.okhttp3:okhttp:4.2.2")

implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.micrometer:micrometer-registry-prometheus")

runtimeOnly("com.h2database:h2")
runtimeOnly("com.mysql:mysql-connector-j")

Expand Down
3 changes: 3 additions & 0 deletions scripts/deploy-rolling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ cd "$COMPOSE_DIR"

set_drain true

echo "기존 연결 종료 대기..."
sleep 15
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

sleep 15는 기존 연결이 종료되기를 기다리는 임시적인 수치입니다. 애플리케이션의 최대 요청 처리 시간이나 NLB의 드레인 설정이 실제로 반영되는 시간을 고려했을 때 15초가 충분하지 않을 수 있습니다. 이 값을 환경 변수로 관리하거나, 가능하다면 실제 활성 연결 수를 체크하는 로직을 검토해 보시기 바랍니다.



echo "[Pull] 새 이미지 받는 중..."
docker compose pull
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ server:
session:
cookie:
same-site: none

management:
endpoints:
web:
exposure:
include: "health,prometheus,loggers"
endpoint:
health:
show-details: never
prometheus:
enabled: true
25 changes: 21 additions & 4 deletions src/main/resources/application-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,38 @@ spring:
jpa:
hibernate:
ddl-auto: validate
servlet:
session:
cookie:
same-site: none

Comment on lines +9 to +13
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

세션 쿠키 설정은 spring.servlet이 아닌 server.servlet 하위에 위치해야 정상적으로 적용됩니다. 이 블록은 잘못된 경로에 있으므로 삭제하고, 아래 server 블록 내의 기존 설정을 수정하여 사용해 주세요.

security:
jwt:
token:
access-secret-key: ${ACCESS_TOKEN_SECRET_KEY}
access-expiry-days: ${ACCESS_TOKEN_EXPIRY_DAYS}
refresh-secret-key: ${REFRESH_TOKEN_SECRET_KEY}
refresh-expiry-days: ${REFRESH_TOKEN_EXPIRY_DAYS}

server:
port: ${APPLICATION_PORT}
forward-headers-strategy: native
servlet:
session:
cookie:
same-site: none
Comment on lines 19 to -22
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

이 설정을 삭제하지 말고 유지해 주세요. spring.servlet으로 옮기면 Spring Boot에서 설정을 인식하지 못합니다. 또한, same-site: none 속성을 사용할 경우 최신 브라우저의 보안 정책에 따라 Secure 속성이 필수적이므로 secure: true 설정을 함께 추가해야 합니다.

  servlet:
    session:
      cookie:
        same-site: none
        secure: true


springdoc:
api-docs:
enabled: false

management:
endpoints:
web:
exposure:
include: "health,prometheus"
endpoint:
health:
show-details: never
prometheus:
enabled: true
metrics:
tags:
application: snackgame
environment: production
8 changes: 8 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,13 @@ springdoc:
disabled: true
override-with-generic-response: false

management:
endpoints:
web:
exposure:
include: ""
endpoint:
health:
show-details: never
server:
shutdown: graceful
Loading