Skip to content

Commit

Permalink
Chore : Update deploy.sh
Browse files Browse the repository at this point in the history
์˜ค๋ฅ˜ ๋ถ„์„์„ ์œ„ํ•ด ๋กœ๊ทธ ์ถ”๊ฐ€
  • Loading branch information
Mouon authored Dec 31, 2023
1 parent 7c1539d commit fd4f27f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ JAR_FILE="chatdiary-0.0.1-SNAPSHOT-plain.jar"
echo "$DEPLOY_KEY" > $KEY_PATH
chmod 600 $KEY_PATH

# JAR ํŒŒ์ผ์„ ์›๊ฒฉ ์„œ๋ฒ„๋กœ ๋ณต์‚ฌ
echo "Deploying to server: $SERVER"
echo "Deploying as user: $USER"
echo "Target directory: $TARGET_DIR"

echo "Copying JAR file to server..."
scp -i $KEY_PATH ./build/libs/$JAR_FILE $USER@$SERVER:$TARGET_DIR

# ์›๊ฒฉ ์„œ๋ฒ„์—์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์‹คํ–‰
echo "Executing application on server..."
ssh -i $KEY_PATH $USER@$SERVER << 'ENDSSH'
cd $TARGET_DIR
java -jar $JAR_FILE &
Expand Down

0 comments on commit fd4f27f

Please sign in to comment.