Skip to content

Commit

Permalink
healthCheck 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkang1517 committed Feb 18, 2024
1 parent d3ed890 commit 2299e31
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/gh_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fi

DEPLOY_JAR=$DEPLOY_PATH$JAR_NAME
echo "> DEPLOY_JAR 배포" >> $DEPLOY_LOG_PATH
nohup java -jar -Dspring.profiles.active=dev $DEPLOY_JAR --server.port=443 >> $APPLICATION_LOG_PATH 2> $DEPLOY_ERR_LOG_PATH &
nohup java -jar -Dspring.profiles.active=dev $DEPLOY_JAR --server.port=8081 >> $APPLICATION_LOG_PATH 2> $DEPLOY_ERR_LOG_PATH &

sleep 3

Expand Down
14 changes: 14 additions & 0 deletions src/main/kotlin/mara/server/domain/HealthController.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package mara.server.domain

import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

@RestController
class HealthController {

@GetMapping("/")
fun healthCheck(): HttpStatus {
return HttpStatus.OK
}
}

0 comments on commit 2299e31

Please sign in to comment.