Skip to content

Commit

Permalink
Merge pull request #52 from dongkyun0713/dongkyun
Browse files Browse the repository at this point in the history
deploy test
  • Loading branch information
dongkyun0713 authored Feb 13, 2024
2 parents ec37298 + f8515ad commit 2c17ce5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
package com.example.titto_backend.matchingBoard.controller;

import com.example.titto_backend.matchingBoard.dto.request.MatchingPostRequest.MatchingPostPagingRequestDto;
import com.example.titto_backend.matchingBoard.dto.response.matchingPostResponse.MatchingPostPagingResponseDto;
import com.example.titto_backend.matchingBoard.service.matchingBoard.MatchingBoardService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

Expand All @@ -16,7 +10,7 @@
@RequiredArgsConstructor
@Tag(name = "Matching Board Controller", description = "맀칭 κ²Œμ‹œνŒ κ΄€λ ¨ API")
public class MatchingBoardController {
private final MatchingBoardService matchingBoardService;
/* private final MatchingBoardService matchingBoardService;
@GetMapping("/posts")
@Operation(
Expand All @@ -29,5 +23,5 @@ public class MatchingBoardController {
})
public MatchingPostPagingResponseDto getAllMatchingPosts(MatchingPostPagingRequestDto matchingPostPagingRequestDto) {
return matchingBoardService.findAllPosts(matchingPostPagingRequestDto);
}
}*/
}
10 changes: 3 additions & 7 deletions scripts/start.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
#!/usr/bin/env bash

PROJECT_ROOT="/home/ubuntu/app"
JAR_FILE="/home/ubuntu/Titto_Backend-0.0.1-SNAPSHOT.jar"
JAR_FILE="/home/ubuntu/app/Titto_Backend/build/libs/Titto_Backend-0.0.1-SNAPSHOT.jar"

APP_LOG="$PROJECT_ROOT/application.log"
ERROR_LOG="$PROJECT_ROOT/error.log"
DEPLOY_LOG="$PROJECT_ROOT/deploy.log"

TIME_NOW=$(date +%c)

# build 파일 볡사
echo "$TIME_NOW > $JAR_FILE 파일 볡사" >> $DEPLOY_LOG
cp $PROJECT_ROOT/Titto_Backend/build/libs/*.jar /home/ubuntu

# jar 파일 μ‹€ν–‰
echo "$TIME_NOW > $JAR_FILE 파일 μ‹€ν–‰" >> $DEPLOY_LOG
cd /home/ubuntu
nohup java -jar $JAR_FILE > /dev/null 2> /dev/null < /dev/null &
cd /home/ubuntu/app/Titto_Backend/build/libs
nohup java -jar Titto_Backend-0.0.1-SNAPSHOT.jar & /dev/null

CURRENT_PID=$(pgrep -f $JAR_FILE)
echo "$TIME_NOW > μ‹€ν–‰λœ ν”„λ‘œμ„ΈμŠ€ 아이디 $CURRENT_PID μž…λ‹ˆλ‹€." >> $DEPLOY_LOG
4 changes: 2 additions & 2 deletions scripts/stop.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env bash

PROJECT_ROOT="/home/ubuntu/app"
JAR_FILE="/home/ubuntu/Titto_Backend-0.0.1-SNAPSHOT.jar"
JAR_FILE="/home/ubuntu/app/Titto_Backend/build/libs/Titto_Backend-0.0.1-SNAPSHOT.jar"

DEPLOY_LOG="$PROJECT_ROOT/deploy.log"

TIME_NOW=$(date +%c)

# ν˜„μž¬ ꡬ동 쀑인 μ• ν”Œλ¦¬μΌ€μ΄μ…˜ pid 확인
CURRENT_PID=$(pgrep -f $JAR_FILE)
CURRENT_PID=$(pgrep -f Titto_Backend-0.0.1-SNAPSHOT.jar)

# ν”„λ‘œμ„ΈμŠ€κ°€ 켜져 있으면 μ’…λ£Œ
if [ -z $CURRENT_PID ]; then
Expand Down

0 comments on commit 2c17ce5

Please sign in to comment.