-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from skkuse/backend-docker
Backend docker
- Loading branch information
Showing
18 changed files
with
61 additions
and
2 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,4 @@ | ||
{ | ||
"java.compile.nullAnalysis.mode": "automatic", | ||
"java.configuration.updateBuildConfiguration": "interactive" | ||
} |
Binary file not shown.
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,22 @@ | ||
# Set base image to Ubuntu | ||
FROM ubuntu:latest | ||
|
||
# Install OpenJDK 17 | ||
RUN apt-get update && \ | ||
apt-get install -y openjdk-17-jdk && \ | ||
apt-get clean; | ||
|
||
# Set the working directory in the container | ||
WORKDIR /usr/src/app | ||
|
||
# Copy the current directory contents to the container at /usr/src/app | ||
COPY . /usr/src/app | ||
|
||
# Expose port 8000 | ||
EXPOSE 8080 | ||
|
||
# Start the Java application | ||
CMD ["java", "-jar", "/usr/src/app/build/libs/se7-0.0.1-SNAPSHOT.jar"] | ||
|
||
# If you want to keep the container running uncomment the following line | ||
#CMD tail -f /dev/null |
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 |
---|---|---|
|
@@ -24,8 +24,7 @@ ext { | |
} | ||
|
||
test { | ||
outputs.dir snippetsDir | ||
useJUnitPlatform() | ||
enabled = false | ||
} | ||
|
||
asciidoctor { | ||
|
Empty file.
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 |
---|---|---|
|
@@ -23,3 +23,4 @@ public void addCorsMappings(CorsRegistry registry) { | |
}; | ||
} | ||
} | ||
|
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="ko"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>HTTP GET 요청 예제</title> | ||
</head> | ||
<body> | ||
<h1>서버 응답:</h1> | ||
<div id="response"></div> | ||
|
||
<script> | ||
// 서버에서 데이터를 가져오는 함수 | ||
function fetchData() { | ||
fetch('http://ec2-3-35-3-126.ap-northeast-2.compute.amazonaws.com:8080/model/cpu') | ||
.then(response => response.text()) | ||
.then(data => { | ||
// 응답을 HTML 요소에 표시 | ||
document.getElementById('response').innerText = data; | ||
}) | ||
.catch(error => { | ||
console.error('요청 중 오류 발생:', error); | ||
}); | ||
} | ||
|
||
// 페이지가 로드될 때 함수 실행 | ||
window.onload = fetchData; | ||
</script> | ||
</body> | ||
</html> |