-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
414c0b1
commit 3b7ab29
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# java 17버전으로 이미지 생성하기 | ||
FROM openjdk:17-jdk | ||
|
||
# 디렉토리 생성 및 이동 | ||
WORKDIR /app | ||
|
||
# Copy build artifact (JAR) | ||
COPY build/libs/luty-server-0.0.1-SNAPSHOT.jar /app/app.jar | ||
|
||
# Set environment variables | ||
ENV JAVA_OPTS="-Dserver.port=8080" | ||
ENV PORT=8080 | ||
|
||
# Expose the application port | ||
EXPOSE 8080 | ||
|
||
# Command to run the application | ||
ENTRYPOINT ["java", "-jar", "/app/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.luty.lutyserver; | ||
|
||
import lombok.NoArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@NoArgsConstructor | ||
public class HealthController { | ||
@GetMapping("/health") | ||
public ResponseEntity<String> checkHealth() { | ||
return ResponseEntity.ok("healthy!!"); | ||
} | ||
} |