Skip to content

Commit 8b6d24e

Browse files
committed
fix: git ignore fix
1 parent be00e08 commit 8b6d24e

File tree

186 files changed

+9184
-0
lines changed

Some content is hidden

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

186 files changed

+9184
-0
lines changed

.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

.github/workflows/cd-develop.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Java CI with Gradle
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up JDK 17 (JDK 17 설정)
15+
uses: actions/setup-java@v2
16+
with:
17+
distribution: 'temurin'
18+
java-version: '17'
19+
20+
- name: Create application.properties from git secret (application.properties 파일 생성)
21+
run: |
22+
mkdir -p default/src/main/resources
23+
mkdir -p chat/src/main/resources
24+
echo "$APPLICATION_DEFAULT" > default/src/main/resources/application.properties
25+
echo "$APPLICATION_CHAT" > chat/src/main/resources/application.properties
26+
env:
27+
APPLICATION_DEFAULT: ${{ secrets.APPLICATION_DEFAULT }}
28+
APPLICATION_CHAT: ${{ secrets.APPLICATION_CHAT }}
29+
30+
- name: Grant execute permission to Gradle (Gradle 실행 권한 부여)
31+
run: |
32+
chmod +x ./default/gradlew
33+
chmod +x ./chat/gradlew
34+
35+
# - name: Detect Changes (변경된 파일 감지)
36+
# id: changed-files
37+
# run: |
38+
# git fetch origin develop --depth=1
39+
# CHANGED_FILES=$(git diff --name-only origin/develop HEAD)
40+
#
41+
# echo "Changed files: $CHANGED_FILES"
42+
#
43+
# if echo "$CHANGED_FILES" | grep -q '^default/'; then
44+
# echo "DEFAULT_CHANGED=true" >> $GITHUB_ENV
45+
# fi
46+
#
47+
# if echo "$CHANGED_FILES" | grep -q '^chat/'; then
48+
# echo "CHAT_CHANGED=true" >> $GITHUB_ENV
49+
# fi
50+
51+
- name: Build JAR (JAR 빌드)
52+
run: |
53+
./default/gradlew bootJar
54+
./chat/gradlew bootJar
55+
56+
# CR_PAT: Container Registry - Personal Access Token
57+
- name: GitHub Container Registry login (GitHub Container Registry 로그인)
58+
run: |
59+
export CR_PAT=${{ secrets.SOUNDLINK_TOKEN }}
60+
echo $CR_PAT | docker login ghcr.io -u ${{ secrets.GIT_ID }} --password-stdin
61+
62+
- name: Docker build & push (Default)
63+
run: |
64+
TAG=$(git rev-parse --short HEAD)
65+
DOCKER_IMAGE_DEFAULT=ghcr.io/${{ secrets.GIT_ID }}/soundlink_default:$TAG
66+
docker build -t soundlink_default -f docker/default.Dockerfile .
67+
docker tag soundlink_default $DOCKER_IMAGE_DEFAULT
68+
docker push $DOCKER_IMAGE_DEFAULT
69+
70+
- name: Docker build & push (Chat)
71+
run: |
72+
TAG=$(git rev-parse --short HEAD)
73+
DOCKER_IMAGE_CHAT=ghcr.io/${{ secrets.GIT_ID }}/soundlink_chat:$TAG
74+
docker build -t soundlink_chat -f docker/chat.Dockerfile .
75+
docker tag soundlink_chat $DOCKER_IMAGE_CHAT
76+
docker push $DOCKER_IMAGE_CHAT
77+
78+
- name: Deploy to Linux Server (리눅스 서버 배포)
79+
uses: appleboy/[email protected]
80+
with:
81+
host: ${{ secrets.HOST }}
82+
username: ${{ secrets.USERNAME }}
83+
key: ${{ secrets.PRIVATE_KEY }}
84+
port: ${{ secrets.PORT }}
85+
script: |
86+
cd /home/ubuntu/docker
87+
sudo docker-compose down spring
88+
sudo docker-compose pull spring
89+
sudo docker-compose up -d spring
90+
sudo docker-compose down spring_chat
91+
sudo docker-compose pull spring_chat
92+
sudo docker-compose up -d spring_chat

.github/workflows/ci-test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Run Spring Boot Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "fix/**"
7+
pull_request:
8+
branches:
9+
- main
10+
- develop
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code (코드 체크아웃)
18+
uses: actions/checkout@v2
19+
20+
- name: Set up JDK 17 (JDK 17 설정)
21+
uses: actions/setup-java@v2
22+
with:
23+
distribution: 'temurin'
24+
java-version: '17'
25+
26+
- name: Create application.properties from git secret (application.properties 파일 생성)
27+
run: |
28+
mkdir -p default/src/main/resources
29+
mkdir -p chat/src/main/resources
30+
echo "$APPLICATION_DEFAULT" > default/src/main/resources/application.properties
31+
echo "$APPLICATION_CHAT" > chat/src/main/resources/application.properties
32+
env:
33+
APPLICATION_DEFAULT: ${{ secrets.APPLICATION_DEFAULT }}
34+
APPLICATION_CHAT: ${{ secrets.APPLICATION_CHAT }}
35+
36+
- name: Grant execute permission to Gradle (Gradle 실행 권한 부여)
37+
run: |
38+
chmod +x ./default/gradlew
39+
chmod +x ./chat/gradlew
40+
41+
- name: Run tests (테스트 실행)
42+
run: |
43+
./default/gradlew test
44+
./chat/gradlew test

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
### yml & properties ###
40+
chat/**/*.yml
41+
default/**/*.yml
42+
chat/src/main/resources/application.properties
43+
default/src/main/resources/application.properties
44+
45+
### 폴더 추가
46+
default/src/main/generated
47+
48+
.DS_Store

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SoundLink
2+
[프로그래머스 백엔드 데브코스] 최종 프로젝트 Team3의 Backend repository
3+
4+
### 브랜치 전략
5+
6+
#### 📋 Commit Message Convention 📋
7+
8+
| Tag | Description |
9+
|------------|-------------------|
10+
| `Feat` | 새로운 기능 추가 |
11+
| `Fix` | 버그 수정 |
12+
| `Docs` | 문서 추가, 수정, 삭제 |
13+
| `Test` | 테스트 코드 추가, 수정, 삭제 |
14+
| `Style` | 코드 형식 변경 |
15+
| `Refactor` | 코드 리팩토링 |
16+
| `Perf` | 성능 개선 |
17+
| `Build` | 빌드 관련 변경사항 |
18+
| `Ci` | CI 관련 설정 수정 |
19+
| `Chore` | 기타 변경사항 |
20+
| `init` | 초기화 |
21+
22+
1. 맨 앞글자도 소문자?
23+
2. 괄호 없이
24+
25+
예) init: git 초기화
26+
27+
---
28+
29+
### 🌳 브랜치 네이밍 규칙
30+
[tag]/[category]/[number] 이렇게 작성해주세요
31+
32+
feat/customer/1
33+
34+
feat/laundry/1
35+
36+
feat/review/1
37+
38+
feat/emotion
39+

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+
}
42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)