Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug Report
about: Report a bug to improve the project
title: '[Bug] '
labels: Bug
assignees: ''

---

## 어떤 버그인가요?

> 어떤 버그인지 간결하게 설명해주세요

## 어떤 상황에서 발생한 버그인가요?

> (가능하면) Given-When-Then 형식으로 서술해주세요

## 예상 결과

> 예상했던 정상적인 결과가 어떤 것이었는지 설명해주세요

## 참고할만한 자료(선택)


## Must do
- [ ] checked assignees
- [ ] checked labels
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/etc-issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Other Issue
about: Feat, Bug 외 이슈
title: '[Other] '
labels:
assignees: ''

---

## 어떤 이슈인가요?
> 어떤 아슈인지 간결하게 설명해주세요


## 작업 상세 내용
- [ ] TODO
- [ ] TODO
- [ ] TODO


## Must do
- [ ] checked assignees
- [ ] checked labels
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature Request
about: Suggest a new feature for the project
title: '[Feat] '
labels: Feat
assignees: ''

---

## 어떤 기능인가요?
> 추가하려는 기능에 대해 간결하게 설명해주세요


## 작업 상세 내용
- [ ] TODO
- [ ] TODO
- [ ] TODO


## 참고할만한 자료(선택)


## Must do
- [ ] checked assignees
- [ ] checked labels
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## PR 타입
> 하나 이상의 PR 타입을 선택해주세요.
- [ ] 기능 추가
- [ ] 기능 삭제
- [ ] 버그 수정
- [ ] 의존성, 환경 변수, 빌드 관련 코드 업데이트
- [ ] 문서 관련
- [ ] 기타


## ⭐Related Issues
- closes #


## 변경 사항
> ex) 로그인 시, 구글 소셜 로그인 기능을 추가했습니다.


## 테스트 결과
> 병합되기 위한 코드는 모두 정상적으로 동작해야 합니다. 결과물에 대한 스크린 샷, GIF, 혹은 라이브 데모가 가능하도록 샘플 API를 추가할 수 있습니다.


## Must do
- [ ] checked assignees
- [ ] checked labels
16 changes: 16 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

echo "Spotless를 사용하여 코드를 자동 포맷팅합니다"

# Spotless 적용
if ./gradlew spotlessApply; then

# Spotless 적용 후 변경된 파일들을 다시 스테이징
git diff --staged --name-only | while read -r file; do
[ -f "$file" ] && git add "$file"
done

else
echo "Spotless 자동 포맷팅에 실패했습니다." >&2
exit 1
fi
29 changes: 29 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Spring boot build test

on:
pull_request:
branches:
- Develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: ✔️ 리포지토리 가져오기
uses: actions/checkout@v4

- name: ✔️ JDK 17 설치
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: ✔️ Gradle 명령 실행 권한 설정
run: chmod +x gradlew

- name: ✔️ Gradle build
run: ./gradlew build -x installLocalGitHook -x spotlessInternalRegisterDependencies -x spotlessJava -x spotlessJavaApply -x spotlessApply -x spotlessJavaCheck -x spotlessCheck -x test

- name: ✔️ Gradle test
run: ./gradlew --info test -Dspring.profiles.active=test
59 changes: 59 additions & 0 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build and Push Docker Image to ECR and Deploy on EC2

on:
pull_request:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: ✔️ 리포지토리 가져오기
uses: actions/checkout@v4

- name: ✔️ JDK 17 설치
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: ✔️ Gradle 명령 실행 권한 설정
run: chmod +x gradlew

- name: ✔️ Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

- name: ✔️ Amazon ECR에 로그인
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: ✔️ Docker Image 빌드 및 ECR에 push
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_NAME }}
IMAGE_TAG: ${{ github.sha }}
run: |
./gradlew jib \
-Djib.to.image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

run-images-on-ec2:
needs: build-and-push
runs-on: ubuntu-latest

steps:
- name: ✔️ EC2 접속 및 배포 스크립트 실행
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST_NAME }}
username: ${{ secrets.SSH_USER_NAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd deploy-script
sh ./deploy.sh
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
24 changes: 24 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Gradle documentation](https://docs.gradle.org)
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/3.3.7/gradle-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.3.7/gradle-plugin/packaging-oci-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/3.3.7/reference/web/servlet.html)
* [Spring Data JPA](https://docs.spring.io/spring-boot/3.3.7/reference/data/sql.html#data.sql.jpa-and-spring-data)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)

### Additional Links
These additional references should also help you:

* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# CodePlay-BE
CodePlay Spring Boot

## CodePlay Spring Boot 파트 팀원

- 강슬미(@2020147542), 김민형(@johnjal), 서지민(@SeoJimin1234), 이찬우(@chan0831)

## ⚡️변경사항 확인 바람⚡️

- [배포 과정 설명](https://github.com/UMC-CodePlay/CodePlay-BE/discussions/52)
- [Docker를 이용한 DB 세팅 방법 확인하기](https://github.com/UMC-CodePlay/CodePlay-BE/discussions/28)
- [자동 스타일 포맷터 사용법 바로가기](https://github.com/UMC-CodePlay/CodePlay-BE/discussions/3#discussioncomment-11796830)
Loading
Loading