From 9019704c7fd94ccc1ceddd0973027be1da9bc402 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 02:37:41 +0900 Subject: [PATCH 01/25] =?UTF-8?q?doc=20:=20=EC=9D=B4=EC=8A=88=ED=85=9C?= =?UTF-8?q?=ED=94=8C=EB=A6=BF=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/issue_template.md diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md new file mode 100644 index 0000000..8f9da6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -0,0 +1,17 @@ +--- +name: issue_template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + +## ✨ About Issue ✨ + + +
+ +## ✅ Todo + +- [ ] todo ! From c9795f763f0deea5a5ad1a56a99e604eb8abc5e7 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 02:39:11 +0900 Subject: [PATCH 02/25] =?UTF-8?q?doc=20:=20PR=20=ED=85=9C=ED=94=8C?= =?UTF-8?q?=EB=A6=BF=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/pull_request_template.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..93b8f10 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,25 @@ +## 🚩 관련 이슈 +- close # + +## 📋 구현 기능 명세 +- [x] + +## 📌 PR Point +- 무슨 이유로 어떻게 코드를 변경했는지 + + +- 어떤 부분에 리뷰어가 집중해야 하는지 + + +- 개발하면서 어떤 점이 궁금했는지 + +## 📸 결과물 스크린샷 +```java +결과 예시 사진 첨부 +``` + +## 🛠️ 테스트 +- [x] 테스트 + +## 🚀 API Endpoint +- From 50f849768db6edebfe15661e88e480807e9a1527 Mon Sep 17 00:00:00 2001 From: mmihye Date: Tue, 26 Dec 2023 03:00:31 +0900 Subject: [PATCH 03/25] =?UTF-8?q?[#1]=20fix=20:=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EC=A0=9D=ED=8A=B8=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linkmind/.gitignore | 4 ++++ linkmind/settings.gradle | 2 +- .../ToasterApplication.java} | 6 +++--- .../common/advice/ControllerExceptionAdvice.java | 6 +++--- .../app/{linkmind => toaster}/common/dto/ApiResponse.java | 6 +++--- .../java/com/app/{linkmind => toaster}/exception/Error.java | 2 +- .../com/app/{linkmind => toaster}/exception/Success.java | 2 +- .../exception/model/CustomException.java | 4 ++-- .../exception/model/NotFoundException.java | 4 ++-- .../ToasterApplicationTests.java} | 4 ++-- 10 files changed, 22 insertions(+), 18 deletions(-) rename linkmind/src/main/java/com/app/{linkmind/LinkmindApplication.java => toaster/ToasterApplication.java} (61%) rename linkmind/src/main/java/com/app/{linkmind => toaster}/common/advice/ControllerExceptionAdvice.java (85%) rename linkmind/src/main/java/com/app/{linkmind => toaster}/common/dto/ApiResponse.java (87%) rename linkmind/src/main/java/com/app/{linkmind => toaster}/exception/Error.java (95%) rename linkmind/src/main/java/com/app/{linkmind => toaster}/exception/Success.java (95%) rename linkmind/src/main/java/com/app/{linkmind => toaster}/exception/model/CustomException.java (77%) rename linkmind/src/main/java/com/app/{linkmind => toaster}/exception/model/NotFoundException.java (63%) rename linkmind/src/test/java/com/app/{linkmind/LinkmindApplicationTests.java => toaster/ToasterApplicationTests.java} (71%) diff --git a/linkmind/.gitignore b/linkmind/.gitignore index fb568e9..0b5e128 100644 --- a/linkmind/.gitignore +++ b/linkmind/.gitignore @@ -37,3 +37,7 @@ out/ .vscode/ application-dev.yaml application-main.yaml +/src/main/resources/ +/src/test/resources/ +/src/test/resources/application-dev.yml +/src/test/resources/application-local.yml diff --git a/linkmind/settings.gradle b/linkmind/settings.gradle index 2f29581..2b45373 100644 --- a/linkmind/settings.gradle +++ b/linkmind/settings.gradle @@ -1 +1 @@ -rootProject.name = 'linkmind' +rootProject.name = 'toaster' diff --git a/linkmind/src/main/java/com/app/linkmind/LinkmindApplication.java b/linkmind/src/main/java/com/app/toaster/ToasterApplication.java similarity index 61% rename from linkmind/src/main/java/com/app/linkmind/LinkmindApplication.java rename to linkmind/src/main/java/com/app/toaster/ToasterApplication.java index 2c59189..3ecea32 100644 --- a/linkmind/src/main/java/com/app/linkmind/LinkmindApplication.java +++ b/linkmind/src/main/java/com/app/toaster/ToasterApplication.java @@ -1,13 +1,13 @@ -package com.app.linkmind; +package com.app.toaster; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication -public class LinkmindApplication { +public class ToasterApplication { public static void main(String[] args) { - SpringApplication.run(LinkmindApplication.class, args); + SpringApplication.run(ToasterApplication.class, args); } } diff --git a/linkmind/src/main/java/com/app/linkmind/common/advice/ControllerExceptionAdvice.java b/linkmind/src/main/java/com/app/toaster/common/advice/ControllerExceptionAdvice.java similarity index 85% rename from linkmind/src/main/java/com/app/linkmind/common/advice/ControllerExceptionAdvice.java rename to linkmind/src/main/java/com/app/toaster/common/advice/ControllerExceptionAdvice.java index a63dd5b..0ddbf1a 100644 --- a/linkmind/src/main/java/com/app/linkmind/common/advice/ControllerExceptionAdvice.java +++ b/linkmind/src/main/java/com/app/toaster/common/advice/ControllerExceptionAdvice.java @@ -1,12 +1,12 @@ -package com.app.linkmind.common.advice; +package com.app.toaster.common.advice; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; -import com.app.linkmind.common.dto.ApiResponse; -import com.app.linkmind.exception.model.CustomException; +import com.app.toaster.common.dto.ApiResponse; +import com.app.toaster.exception.model.CustomException; import lombok.NoArgsConstructor; diff --git a/linkmind/src/main/java/com/app/linkmind/common/dto/ApiResponse.java b/linkmind/src/main/java/com/app/toaster/common/dto/ApiResponse.java similarity index 87% rename from linkmind/src/main/java/com/app/linkmind/common/dto/ApiResponse.java rename to linkmind/src/main/java/com/app/toaster/common/dto/ApiResponse.java index cd3ffb2..466c4b9 100644 --- a/linkmind/src/main/java/com/app/linkmind/common/dto/ApiResponse.java +++ b/linkmind/src/main/java/com/app/toaster/common/dto/ApiResponse.java @@ -1,7 +1,7 @@ -package com.app.linkmind.common.dto; +package com.app.toaster.common.dto; -import com.app.linkmind.exception.Error; -import com.app.linkmind.exception.Success; +import com.app.toaster.exception.Error; +import com.app.toaster.exception.Success; import lombok.AccessLevel; import lombok.AllArgsConstructor; diff --git a/linkmind/src/main/java/com/app/linkmind/exception/Error.java b/linkmind/src/main/java/com/app/toaster/exception/Error.java similarity index 95% rename from linkmind/src/main/java/com/app/linkmind/exception/Error.java rename to linkmind/src/main/java/com/app/toaster/exception/Error.java index b42157d..c08a4b5 100644 --- a/linkmind/src/main/java/com/app/linkmind/exception/Error.java +++ b/linkmind/src/main/java/com/app/toaster/exception/Error.java @@ -1,4 +1,4 @@ -package com.app.linkmind.exception; +package com.app.toaster.exception; import org.springframework.http.HttpStatus; diff --git a/linkmind/src/main/java/com/app/linkmind/exception/Success.java b/linkmind/src/main/java/com/app/toaster/exception/Success.java similarity index 95% rename from linkmind/src/main/java/com/app/linkmind/exception/Success.java rename to linkmind/src/main/java/com/app/toaster/exception/Success.java index c6986a7..12a6995 100644 --- a/linkmind/src/main/java/com/app/linkmind/exception/Success.java +++ b/linkmind/src/main/java/com/app/toaster/exception/Success.java @@ -1,4 +1,4 @@ -package com.app.linkmind.exception; +package com.app.toaster.exception; import org.springframework.http.HttpStatus; diff --git a/linkmind/src/main/java/com/app/linkmind/exception/model/CustomException.java b/linkmind/src/main/java/com/app/toaster/exception/model/CustomException.java similarity index 77% rename from linkmind/src/main/java/com/app/linkmind/exception/model/CustomException.java rename to linkmind/src/main/java/com/app/toaster/exception/model/CustomException.java index b0657a8..ea0a02f 100644 --- a/linkmind/src/main/java/com/app/linkmind/exception/model/CustomException.java +++ b/linkmind/src/main/java/com/app/toaster/exception/model/CustomException.java @@ -1,6 +1,6 @@ -package com.app.linkmind.exception.model; +package com.app.toaster.exception.model; -import com.app.linkmind.exception.Error; +import com.app.toaster.exception.Error; import lombok.Getter; diff --git a/linkmind/src/main/java/com/app/linkmind/exception/model/NotFoundException.java b/linkmind/src/main/java/com/app/toaster/exception/model/NotFoundException.java similarity index 63% rename from linkmind/src/main/java/com/app/linkmind/exception/model/NotFoundException.java rename to linkmind/src/main/java/com/app/toaster/exception/model/NotFoundException.java index 7040e49..ec9d965 100644 --- a/linkmind/src/main/java/com/app/linkmind/exception/model/NotFoundException.java +++ b/linkmind/src/main/java/com/app/toaster/exception/model/NotFoundException.java @@ -1,6 +1,6 @@ -package com.app.linkmind.exception.model; +package com.app.toaster.exception.model; -import com.app.linkmind.exception.Error; +import com.app.toaster.exception.Error; public class NotFoundException extends CustomException { public NotFoundException(Error error, String message) { diff --git a/linkmind/src/test/java/com/app/linkmind/LinkmindApplicationTests.java b/linkmind/src/test/java/com/app/toaster/ToasterApplicationTests.java similarity index 71% rename from linkmind/src/test/java/com/app/linkmind/LinkmindApplicationTests.java rename to linkmind/src/test/java/com/app/toaster/ToasterApplicationTests.java index 8d024c1..1dce7bf 100644 --- a/linkmind/src/test/java/com/app/linkmind/LinkmindApplicationTests.java +++ b/linkmind/src/test/java/com/app/toaster/ToasterApplicationTests.java @@ -1,10 +1,10 @@ -package com.app.linkmind; +package com.app.toaster; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest -class LinkmindApplicationTests { +class ToasterApplicationTests { @Test void contextLoads() { From 1a04975a5094cfc6b927c9f82a3a77469e8505a3 Mon Sep 17 00:00:00 2001 From: mmihye Date: Tue, 26 Dec 2023 03:02:12 +0900 Subject: [PATCH 04/25] =?UTF-8?q?[#1]=20feat=20:=20testApi=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toaster/controller/HealthCheckController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 linkmind/src/main/java/com/app/toaster/controller/HealthCheckController.java diff --git a/linkmind/src/main/java/com/app/toaster/controller/HealthCheckController.java b/linkmind/src/main/java/com/app/toaster/controller/HealthCheckController.java new file mode 100644 index 0000000..3582b1f --- /dev/null +++ b/linkmind/src/main/java/com/app/toaster/controller/HealthCheckController.java @@ -0,0 +1,13 @@ +package com.app.toaster.controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HealthCheckController { + + @GetMapping("/health") + public String healthCheck() { + return "OK"; + } +} From 0413af78ffa8bbb251a700af4c20266a74da3c96 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 03:30:00 +0900 Subject: [PATCH 05/25] =?UTF-8?q?fix=20:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=ED=8F=B4=EB=8D=94=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linkmind/src/main/java/com/app/linkmind/config/.gitkeep | 0 linkmind/src/main/java/com/app/linkmind/controller/.gitkeep | 0 linkmind/src/main/java/com/app/linkmind/domain/.gitkeep | 0 .../src/main/java/com/app/linkmind/external/client/aws/.gitkeep | 0 linkmind/src/main/java/com/app/linkmind/infrastructure/.gitkeep | 0 linkmind/src/main/java/com/app/linkmind/service/.gitkeep | 0 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 linkmind/src/main/java/com/app/linkmind/config/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/controller/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/domain/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/external/client/aws/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/infrastructure/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/service/.gitkeep diff --git a/linkmind/src/main/java/com/app/linkmind/config/.gitkeep b/linkmind/src/main/java/com/app/linkmind/config/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/controller/.gitkeep b/linkmind/src/main/java/com/app/linkmind/controller/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/domain/.gitkeep b/linkmind/src/main/java/com/app/linkmind/domain/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/external/client/aws/.gitkeep b/linkmind/src/main/java/com/app/linkmind/external/client/aws/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/infrastructure/.gitkeep b/linkmind/src/main/java/com/app/linkmind/infrastructure/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/service/.gitkeep b/linkmind/src/main/java/com/app/linkmind/service/.gitkeep deleted file mode 100644 index e69de29..0000000 From 974381a226eda5e9cc2b63449552cb678617a62b Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:04:09 +0900 Subject: [PATCH 06/25] =?UTF-8?q?doc=20:=20github=20actions=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f399acd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: CI + +on: + pull_request: + branches: [ "develop" ] + +jobs: + build: + runs-on: ubuntu-22.04 + env: + working-directory: linkmind + + steps: + - name: 체크아웃 + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: '17' + + - name: application.yaml 생성 + run: | + cd src/main/resources + echo "${{ secrets.APPLICATION }}" > ./application.yaml + working-directory: ${{ env.working-directory }} + + - name: 빌드 + run: | + chmod +x gradlew + ./gradlew build -x test + working-directory: ${{ env.working-directory }} + shell: bash From 2cc5f7bcb4ee92e5a2f75b7b3f2fd89fc046a482 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:10:34 +0900 Subject: [PATCH 07/25] doc : Rename main.yml to CI.yml --- .github/workflows/{main.yml => CI.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.yml => CI.yml} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/CI.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/CI.yml From 2c4a2b0964c3f398026b2ece315066f640e1bdf4 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:14:48 +0900 Subject: [PATCH 08/25] doc : Create Dockerfile --- linkmind/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 linkmind/Dockerfile diff --git a/linkmind/Dockerfile b/linkmind/Dockerfile new file mode 100644 index 0000000..1754cb3 --- /dev/null +++ b/linkmind/Dockerfile @@ -0,0 +1,7 @@ +FROM amd64/amazoncorretto:17 + +WORKDIR /app + +COPY ./build/libs/toaster-0.0.1-SNAPSHOT /app/toaster.jar + +CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=dev", "toaster.jar"] From f024d7c6d29ed70e7da370774235bb59c8261694 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:18:29 +0900 Subject: [PATCH 09/25] doc : Create CD.yml --- .github/workflows/CD.yml | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/CD.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..d50b5b8 --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,64 @@ +name: CD + +on: + push: + branches: [ "develop" ] + +jobs: + deploy-ci: + runs-on: ubuntu-22.04 + env: + working-directory: linkmind + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: '17' + + - name: application.yaml 생성 + run: | + cd src/main/resources + echo "${{ secrets.APPLICATION }}" > ./application-dev.yaml + working-directory: ${{ env.working-directory }} + + - name: 빌드 + run: | + chmod +x gradlew + ./gradlew build -x test + working-directory: ${{ env.working-directory }} + shell: bash + + - name: docker build 가능하도록 환경 설정 + uses: docker/setup-buildx-action@v2.9.1 + + - name: docker hub에로그인 + uses: docker/login-action@v2.2.0 + with: + username: ${{ secrets.DOCKERHUB_LOGIN_USERNAME }} + password: ${{ secrets.DOCKERHUB_LOGIN_ACCESSTOKEN }} + + - name: docker image 빌드 및 푸시 + run: | + docker build --platform linux/amd64 -t {dockerhub계정id}/do-sopt-seminar . + docker push {dockerhub계정id}/do-sopt-seminar + working-directory: ${{ env.working-directory }} + + deploy-cd: + needs: deploy-ci + runs-on: ubuntu-22.04 + + steps: + - name: 도커 컨테이너 실행 + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.RELEASE_SERVER_IP }} + username: ${{ secrets.RELEASE_SERVER_USER }} + key: ${{ secrets.RELEASE_SERVER_KEY }} + script: | + docker rm -f do-sopt-seminar + docker image pull mmihye/do-sopt-seminar + docker run -d --name do-sopt-seminar-8080 -p 8080:8080 mmihye/do-sopt-seminar From e7122408032e3b0ca9bffbfd3bc9e358ada87d43 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:21:33 +0900 Subject: [PATCH 10/25] =?UTF-8?q?doc=20:=20CD.yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index d50b5b8..014d76a 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -59,6 +59,6 @@ jobs: username: ${{ secrets.RELEASE_SERVER_USER }} key: ${{ secrets.RELEASE_SERVER_KEY }} script: | - docker rm -f do-sopt-seminar - docker image pull mmihye/do-sopt-seminar - docker run -d --name do-sopt-seminar-8080 -p 8080:8080 mmihye/do-sopt-seminar + docker rm -f do-sopt-seminar + docker image pull mmihye/do-sopt-seminar + docker run -d --name do-sopt-seminar-8080 -p 8080:8080 mmihye/do-sopt-seminar From fffcb26caa8d08ab212394c05d59baa164a67404 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:25:33 +0900 Subject: [PATCH 11/25] =?UTF-8?q?doc=20:=20CI.yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f399acd..5b569e2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,14 +16,14 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v3 - with: + with: distribution: 'corretto' java-version: '17' - name: application.yaml 생성 run: | cd src/main/resources - echo "${{ secrets.APPLICATION }}" > ./application.yaml + echo "${{ secrets.APPLICATION }}" > ./application-dev.yaml working-directory: ${{ env.working-directory }} - name: 빌드 From 3dfbb7685ef2b9ea7af9a3cedbdcc22adf00b28b Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:27:21 +0900 Subject: [PATCH 12/25] doc : Update CD.yml --- .github/workflows/CD.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 014d76a..5263b8e 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -59,6 +59,5 @@ jobs: username: ${{ secrets.RELEASE_SERVER_USER }} key: ${{ secrets.RELEASE_SERVER_KEY }} script: | - docker rm -f do-sopt-seminar - docker image pull mmihye/do-sopt-seminar - docker run -d --name do-sopt-seminar-8080 -p 8080:8080 mmihye/do-sopt-seminar + cd ~ + ./deploy.sh From e752ca602caa326101e50bc0cffec46544360d29 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:29:08 +0900 Subject: [PATCH 13/25] doc : Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5b569e2..14beae2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: - name: application.yaml 생성 run: | cd src/main/resources - echo "${{ secrets.APPLICATION }}" > ./application-dev.yaml + echo "${{ secrets.APPLICATION }}" > ./application.yaml working-directory: ${{ env.working-directory }} - name: 빌드 From 7a9ea1761d5980e22c3fc499495bdbc341380a8c Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:33:38 +0900 Subject: [PATCH 14/25] doc : Update CI.yml --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 14beae2..81f1f14 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,6 +19,11 @@ jobs: with: distribution: 'corretto' java-version: '17' + + - name: resource 폴더 생성 + run: | + cd src/main + mkdir resources - name: application.yaml 생성 run: | From d9e83fde268296723dd28f7e810f7257901d6011 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:35:28 +0900 Subject: [PATCH 15/25] doc : Update CI.yml --- .github/workflows/CI.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 81f1f14..d22c555 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,15 +19,12 @@ jobs: with: distribution: 'corretto' java-version: '17' - - - name: resource 폴더 생성 - run: | - cd src/main - mkdir resources - name: application.yaml 생성 run: | - cd src/main/resources + cd src/main + mkdir resources + cd resources echo "${{ secrets.APPLICATION }}" > ./application.yaml working-directory: ${{ env.working-directory }} From 060b2aa922664075ab6d21e26cb54febb605f06c Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:37:01 +0900 Subject: [PATCH 16/25] doc : Update CI.yml --- .github/workflows/CI.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d22c555..14beae2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,9 +22,7 @@ jobs: - name: application.yaml 생성 run: | - cd src/main - mkdir resources - cd resources + cd src/main/resources echo "${{ secrets.APPLICATION }}" > ./application.yaml working-directory: ${{ env.working-directory }} From cda2530cd037bca6eebd0f37959228df0ea63be2 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:38:19 +0900 Subject: [PATCH 17/25] doc : Create data.sql --- linkmind/src/main/java/com/app/toaster/resource/data.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 linkmind/src/main/java/com/app/toaster/resource/data.sql diff --git a/linkmind/src/main/java/com/app/toaster/resource/data.sql b/linkmind/src/main/java/com/app/toaster/resource/data.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/linkmind/src/main/java/com/app/toaster/resource/data.sql @@ -0,0 +1 @@ + From 95e15ab31e26da46cedcbdec697d3d0825e39b19 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:39:21 +0900 Subject: [PATCH 18/25] fix : Delete resource directory --- linkmind/src/main/java/com/app/toaster/resource/data.sql | 1 - 1 file changed, 1 deletion(-) delete mode 100644 linkmind/src/main/java/com/app/toaster/resource/data.sql diff --git a/linkmind/src/main/java/com/app/toaster/resource/data.sql b/linkmind/src/main/java/com/app/toaster/resource/data.sql deleted file mode 100644 index 8b13789..0000000 --- a/linkmind/src/main/java/com/app/toaster/resource/data.sql +++ /dev/null @@ -1 +0,0 @@ - From 552930abdb982ba631e2b77b5e3df0f913a8402a Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:39:39 +0900 Subject: [PATCH 19/25] doc : Create data.sql --- linkmind/src/main/java/com/app/toaster/resources/data.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 linkmind/src/main/java/com/app/toaster/resources/data.sql diff --git a/linkmind/src/main/java/com/app/toaster/resources/data.sql b/linkmind/src/main/java/com/app/toaster/resources/data.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/linkmind/src/main/java/com/app/toaster/resources/data.sql @@ -0,0 +1 @@ + From fec65e7910bb947e9988ea8189d66d836716462d Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:44:26 +0900 Subject: [PATCH 20/25] doc: Create data.sql --- linkmind/src/main/resources/data.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 linkmind/src/main/resources/data.sql diff --git a/linkmind/src/main/resources/data.sql b/linkmind/src/main/resources/data.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/linkmind/src/main/resources/data.sql @@ -0,0 +1 @@ + From f929cdddf3fa723a7ec3d0b70f58d3a4ba7b7a85 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:49:56 +0900 Subject: [PATCH 21/25] doc : Update CD.yml --- .github/workflows/CD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 5263b8e..e982631 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -43,8 +43,8 @@ jobs: - name: docker image 빌드 및 푸시 run: | - docker build --platform linux/amd64 -t {dockerhub계정id}/do-sopt-seminar . - docker push {dockerhub계정id}/do-sopt-seminar + docker build --platform linux/amd64 -t mmihye/toaster . + docker push mmihye/toaster working-directory: ${{ env.working-directory }} deploy-cd: From e60ee52080d6f80130cdf2d7928cbe4226ae6474 Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 06:01:57 +0900 Subject: [PATCH 22/25] doc : Update Dockerfile --- linkmind/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkmind/Dockerfile b/linkmind/Dockerfile index 1754cb3..82d38d0 100644 --- a/linkmind/Dockerfile +++ b/linkmind/Dockerfile @@ -2,6 +2,6 @@ FROM amd64/amazoncorretto:17 WORKDIR /app -COPY ./build/libs/toaster-0.0.1-SNAPSHOT /app/toaster.jar +COPY ./build/libs/toaster-0.0.1-SNAPSHOT.jar /app/toaster.jar CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=dev", "toaster.jar"] From 5a811802a15f736b42d3d973dbb810165a57a9fe Mon Sep 17 00:00:00 2001 From: mmihye Date: Tue, 26 Dec 2023 17:36:51 +0900 Subject: [PATCH 23/25] =?UTF-8?q?[#4]=20fix=20:=20security=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linkmind/.gitignore | 4 ++-- linkmind/build.gradle | 5 +++-- linkmind/src/main/java/com/app/linkmind/config/.gitkeep | 0 linkmind/src/main/java/com/app/linkmind/controller/.gitkeep | 0 linkmind/src/main/java/com/app/linkmind/domain/.gitkeep | 0 .../main/java/com/app/linkmind/external/client/aws/.gitkeep | 0 .../src/main/java/com/app/linkmind/infrastructure/.gitkeep | 0 linkmind/src/main/java/com/app/linkmind/service/.gitkeep | 0 8 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 linkmind/src/main/java/com/app/linkmind/config/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/controller/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/domain/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/external/client/aws/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/infrastructure/.gitkeep delete mode 100644 linkmind/src/main/java/com/app/linkmind/service/.gitkeep diff --git a/linkmind/.gitignore b/linkmind/.gitignore index 0b5e128..2501ddc 100644 --- a/linkmind/.gitignore +++ b/linkmind/.gitignore @@ -37,7 +37,7 @@ out/ .vscode/ application-dev.yaml application-main.yaml -/src/main/resources/ -/src/test/resources/ /src/test/resources/application-dev.yml /src/test/resources/application-local.yml +/src/main/resources/application-dev.yml +/src/main/resources/application-local.yml diff --git a/linkmind/build.gradle b/linkmind/build.gradle index cd8d605..396f3e4 100644 --- a/linkmind/build.gradle +++ b/linkmind/build.gradle @@ -26,11 +26,12 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'mysql:mysql-connector-java:8.0.32' compileOnly 'org.projectlombok:lombok' - implementation 'org.springframework.boot:spring-boot-starter-security' - testImplementation 'org.springframework.security:spring-security-test' + //implementation 'org.springframework.boot:spring-boot-starter-security' + //testImplementation 'org.springframework.security:spring-security-test' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' runtimeOnly 'com.mysql:mysql-connector-j' + implementation 'org.springframework.boot:spring-boot-starter-actuator' } tasks.named('test') { diff --git a/linkmind/src/main/java/com/app/linkmind/config/.gitkeep b/linkmind/src/main/java/com/app/linkmind/config/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/controller/.gitkeep b/linkmind/src/main/java/com/app/linkmind/controller/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/domain/.gitkeep b/linkmind/src/main/java/com/app/linkmind/domain/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/external/client/aws/.gitkeep b/linkmind/src/main/java/com/app/linkmind/external/client/aws/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/infrastructure/.gitkeep b/linkmind/src/main/java/com/app/linkmind/infrastructure/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/linkmind/src/main/java/com/app/linkmind/service/.gitkeep b/linkmind/src/main/java/com/app/linkmind/service/.gitkeep deleted file mode 100644 index e69de29..0000000 From 9057550b64fd690b17a2f0a9007345e5c1d50da9 Mon Sep 17 00:00:00 2001 From: mmihye Date: Tue, 26 Dec 2023 17:37:11 +0900 Subject: [PATCH 24/25] =?UTF-8?q?[#4]=20feat=20:=20testAPi=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linkmind/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/linkmind/build.gradle b/linkmind/build.gradle index 396f3e4..65e0363 100644 --- a/linkmind/build.gradle +++ b/linkmind/build.gradle @@ -28,6 +28,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' //implementation 'org.springframework.boot:spring-boot-starter-security' //testImplementation 'org.springframework.security:spring-security-test' + implementation 'org.springframework.boot:spring-boot-starter-actuator' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' runtimeOnly 'com.mysql:mysql-connector-j' From 6bf09b5de64ef9296be49854e268555c86ca3f3b Mon Sep 17 00:00:00 2001 From: Mihye <92644651+mmihye@users.noreply.github.com> Date: Tue, 26 Dec 2023 17:50:38 +0900 Subject: [PATCH 25/25] =?UTF-8?q?cln=20:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=ED=8F=B4=EB=8D=94=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linkmind/src/main/java/com/app/toaster/resources/data.sql | 1 - 1 file changed, 1 deletion(-) delete mode 100644 linkmind/src/main/java/com/app/toaster/resources/data.sql diff --git a/linkmind/src/main/java/com/app/toaster/resources/data.sql b/linkmind/src/main/java/com/app/toaster/resources/data.sql deleted file mode 100644 index 8b13789..0000000 --- a/linkmind/src/main/java/com/app/toaster/resources/data.sql +++ /dev/null @@ -1 +0,0 @@ -