Skip to content

Commit b6266d1

Browse files
committed
Merge branch 'chat-dev' into dev
2 parents 88ae6c3 + ac44f7b commit b6266d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2486
-0
lines changed

chat/.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/gradlew text eol=lf
2+
*.bat text eol=crlf
3+
*.jar binary
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## 어떤 버그인가요?
11+
12+
> 어떤 버그인지 간결하게 설명해주세요
13+
14+
## 어떤 상황에서 발생한 버그인가요?
15+
16+
> (가능하면) Given-When-Then 형식으로 서술해주세요
17+
18+
## 예상 결과
19+
20+
> 예상했던 정상적인 결과가 어떤 것이었는지 설명해주세요
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## 어떤 기능인가요?
11+
12+
> 추가하려는 기능에 대해 간결하게 설명해주세요
13+
14+
## 작업 상세 내용
15+
16+
- [ ] TODO
17+
- [ ] TODO
18+
- [ ] TODO

chat/.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

chat/.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
HELP.md
2+
.gradle
3+
build/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
!**/src/main/**/build/
6+
!**/src/test/**/build/
7+
8+
### STS ###
9+
.apt_generated
10+
.classpath
11+
.factorypath
12+
.project
13+
.settings
14+
.springBeans
15+
.sts4-cache
16+
bin/
17+
!**/src/main/**/bin/
18+
!**/src/test/**/bin/
19+
20+
### IntelliJ IDEA ###
21+
.idea
22+
*.iws
23+
*.iml
24+
*.ipr
25+
out/
26+
!**/src/main/**/out/
27+
!**/src/test/**/out/
28+
29+
### NetBeans ###
30+
/nbproject/private/
31+
/nbbuild/
32+
/dist/
33+
/nbdist/
34+
/.nb-gradle/
35+
36+
### VS Code ###
37+
.vscode/
38+
39+
/src/main/resources/application.properties

chat/build.gradle.kts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
plugins {
2+
java
3+
id("org.springframework.boot") version "3.4.2"
4+
id("io.spring.dependency-management") version "1.1.7"
5+
id("com.gorylenko.gradle-git-properties") version "2.4.1" // Git 플러그인 추가
6+
}
7+
8+
group = "org.example"
9+
version = "0.0.1-SNAPSHOT"
10+
11+
java {
12+
toolchain {
13+
languageVersion = JavaLanguageVersion.of(17)
14+
}
15+
}
16+
17+
configurations {
18+
compileOnly {
19+
extendsFrom(configurations.annotationProcessor.get())
20+
}
21+
}
22+
23+
repositories {
24+
mavenCentral()
25+
}
26+
27+
dependencies {
28+
implementation("org.springframework.boot:spring-boot-starter-security")
29+
testImplementation("org.springframework.security:spring-security-test")
30+
developmentOnly("org.springframework.boot:spring-boot-devtools")
31+
implementation("org.springframework.boot:spring-boot-starter-web")
32+
implementation("org.springframework.boot:spring-boot-starter-websocket")
33+
implementation("org.springframework.boot:spring-boot-starter-actuator")
34+
implementation("org.springframework.boot:spring-boot-starter-aop")
35+
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
36+
37+
implementation("org.springframework.kafka:spring-kafka")
38+
implementation("org.apache.kafka:kafka-streams")
39+
40+
compileOnly("org.projectlombok:lombok")
41+
annotationProcessor("org.projectlombok:lombok")
42+
43+
// JWT
44+
implementation("io.jsonwebtoken:jjwt-api:0.11.5")
45+
implementation("io.jsonwebtoken:jjwt-impl:0.11.5")
46+
implementation("io.jsonwebtoken:jjwt-jackson:0.11.5")
47+
48+
testImplementation("org.springframework.boot:spring-boot-starter-test")
49+
testImplementation("org.springframework.kafka:spring-kafka-test")
50+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
51+
52+
// Swagger
53+
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0")
54+
55+
// Redis
56+
implementation("org.springframework.boot:spring-boot-starter-data-redis")
57+
}
58+
59+
// Git 커밋 정보를 git.properties로 생성
60+
gitProperties {
61+
keys = listOf("git.commit.id.abbrev") // 짧은 커밋 ID 사용
62+
}
63+
64+
tasks.withType<Test> {
65+
useJUnitPlatform()
66+
}
67+
68+
tasks.bootBuildImage {
69+
builder = "paketobuildpacks/builder-jammy-base:latest"
70+
}

0 commit comments

Comments
 (0)