Skip to content

Commit 0e5f560

Browse files
committed
refactor: 멀티레포에서 모노레포로 수정
1 parent 7253f5b commit 0e5f560

File tree

8 files changed

+55
-360
lines changed

8 files changed

+55
-360
lines changed

.github/workflows/main.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Java CI with Gradle
2+
3+
on:
4+
push:
5+
branches: [ "dev" ]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: '17'
18+
distribution: 'temurin'
19+
20+
## 원격 서버에서 docker-compose 실행
21+
- name: Build and Run Docker on Server
22+
uses: appleboy/ssh-action@master
23+
with:
24+
host: ${{ secrets.HOST }}
25+
username: ${{ secrets.USERNAME }}
26+
key: ${{ secrets.PRIVATE_KEY }}
27+
port: ${{ secrets.PORT }}
28+
script: |
29+
# 최신 코드 가져오기
30+
cd /home/ubuntu/chat
31+
git pull origin dev
32+
33+
# application.properties 새로 생성
34+
touch ./src/main/resources/application.properties
35+
echo "${{ secrets.APPLICATION }}" | sudo tee ./src/main/resources/application.properties > /dev/null
36+
37+
# 🔹 JAR 빌드 (서버에서 실행)
38+
./gradlew bootJar
39+
40+
# 파일명 변경
41+
mv /home/ubuntu/chat/build/libs/SoundLinkChat_Java-0.0.1-SNAPSHOT.jar /home/ubuntu/docker/soundlink.jar
42+
43+
cd /home/ubuntu/docker
44+
45+
# 기존 Spring 컨테이너 중지 및 제거
46+
sudo docker-compose stop spring_chat
47+
sudo docker-compose rm -f spring_chat
48+
49+
# Spring 컨테이너만 다시 빌드 & 실행
50+
docker-compose up --build -d spring_chat
51+
sudo docker-compose up -d spring_chat
52+
53+
# 불필요한 이미지 정리
54+
sudo docker image prune -f

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ out/
4141
*.properties
4242

4343
### 폴더 추가
44-
src/main/generated/
44+
default/src/main/generated
4545

4646
.DS_Store

default/src/main/generated/org/dfbf/soundlink/domain/blocklist/entity/QBlocklist.java

Lines changed: 0 additions & 58 deletions
This file was deleted.

default/src/main/generated/org/dfbf/soundlink/domain/chat/entity/QChatRoom.java

Lines changed: 0 additions & 64 deletions
This file was deleted.

default/src/main/generated/org/dfbf/soundlink/domain/emotionRecord/entity/QEmotionRecord.java

Lines changed: 0 additions & 62 deletions
This file was deleted.

default/src/main/generated/org/dfbf/soundlink/domain/emotionRecord/entity/QSpotifyMusic.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

default/src/main/generated/org/dfbf/soundlink/domain/user/entity/QProfileMusic.java

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)