-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
203 changed files
with
8,023 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
--- | ||
name: "♻️ REFACTOR" | ||
about: 리팩토링 템플릿입니다. | ||
title: "♻️ [REFACTOR]" | ||
title: "️♻️ refactor: " | ||
labels: refactor | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
|
||
- 리팩토링 | ||
|
||
# TODO | ||
|
||
- [ ] 리팩토링 | ||
|
||
# etc | ||
|
||
- 흐읍 |
9 changes: 6 additions & 3 deletions
9
.github/ISSUE_TEMPLATE/✨-feature.md → .github/ISSUE_TEMPLATE/✨-feat.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
--- | ||
name: "✨ FEATURE" | ||
name: "✨ FEAT" | ||
about: 기능 개발 이슈템플릿입니다. | ||
title: "✨ [FEATURE]" | ||
labels: feature | ||
title: "✨ feat: " | ||
labels: feat | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
|
||
- 숨쉬기 기능 개발 | ||
|
||
# TODO | ||
|
||
- [ ] 간지나게 숨쉬기 | ||
|
||
# etc | ||
|
||
- 어쩌구저쩌구 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: "🐛 FIX" | ||
about: 버그 수정 템플릿입니다. | ||
title: "🐛 fix: " | ||
labels: fix | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
|
||
- 숨쉬기 기능 버그 발견 | ||
|
||
# TODO | ||
|
||
- [ ] 숨참기 | ||
|
||
# etc | ||
|
||
- 흐읍 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: "👷 CI" | ||
about: 배포 작업 템플릿입니다. | ||
title: "👷 ci: " | ||
labels: ci | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
|
||
- xx | ||
|
||
# TODO | ||
|
||
- [ ] 작업 내용 | ||
|
||
# etc | ||
|
||
- 흐읍 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: "📝 DOCS" | ||
about: 문서 작업 템플릿입니다. | ||
title: "📝 docs: " | ||
labels: docs | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Title | ||
|
||
- xx 문서 작업 | ||
|
||
# TODO | ||
|
||
- [ ] 작업 내용 | ||
|
||
# etc | ||
|
||
- 흐읍 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# 📎 Issue Number | ||
- | ||
# ☝️Issue Number | ||
|
||
- resolves # | ||
|
||
# 🔎 Key Changes | ||
- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: CD | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "develop" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
cd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
## gradle 캐싱 | ||
- name: Gradle Caching | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
## create application.yml | ||
- name: make application-secret.yml | ||
run: | | ||
mkdir -p ./api/src/main/resources | ||
touch ./api/src/main/resources/application-secret.yml | ||
shell: bash | ||
- name: deliver application-secret.yml | ||
run: echo "${{ secrets.APPLICATION_SECRET }}" > ./api/src/main/resources/application-secret.yml | ||
shell: bash | ||
|
||
## firebase-key 설정 | ||
- name: Set FCM | ||
env: | ||
DATA: ${{ secrets.FIREBASE_KEY }} | ||
run: | | ||
mkdir -p ./core/core-infra-firebase/src/main/resources/firebase | ||
echo $DATA > ./core/core-infra-firebase/src/main/resources/firebase/firebase-key.json | ||
# 빌드 및 테스트 단계. | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
# gradle build | ||
- name: Build with Gradle | ||
run: ./gradlew build -x test | ||
|
||
# push 하기 위해 로그인 | ||
- name: Docker Hub 로그인 | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
#도커 빌드 & 이미지 push | ||
- name: Docker build & Push | ||
run: | | ||
docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/sponus-docker . | ||
docker push ${{ secrets.DOCKER_USERNAME }}/sponus-docker | ||
# Docker 파일을 EC2 서버에 배포 | ||
- name: Deploy to Prod | ||
uses: appleboy/ssh-action@master | ||
id: deploy-prod | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ec2-user | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
port: 22 | ||
script: | | ||
if [ ! -z "$(docker ps -q)" ]; then | ||
docker stop $(docker ps -q) | ||
fi | ||
if [ ! -z "$(docker ps -aq)" ]; then | ||
docker rm $(docker ps -aq) | ||
fi | ||
if [ ! -z "$(docker network ls -qf name=my-network)" ]; then | ||
docker network rm my-network | ||
fi | ||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | ||
docker pull ${{ secrets.DOCKER_USERNAME }}/sponus-docker | ||
docker pull redis | ||
docker network create my-network | ||
docker run --name my-redis --network my-network -d redis | ||
docker run -e SPRING_PROFILES_ACTIVE=prod -it -d -p 8080:8080 --name sponus-docker -e TZ=Asia/Seoul --network my-network ${{ secrets.DOCKER_USERNAME }}/sponus-docker | ||
docker system prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Test with Gradle | ||
run: ./gradlew test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM openjdk:17-jdk | ||
ARG JAR_FILE=./api/build/libs/*.jar | ||
COPY ${JAR_FILE} app.jar | ||
ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar", "/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Read Me First | ||
The following was discovered as part of building this project: | ||
|
||
* The original package name 'com.sponus.sponus-be' is invalid and this project uses 'com.sponus.sponusbe' instead. | ||
|
||
# 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/docs/3.2.1/gradle-plugin/reference/html/) | ||
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.2.1/gradle-plugin/reference/html/#build-image) | ||
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.2.1/reference/htmlsingle/index.html#web) | ||
* [Spring Security](https://docs.spring.io/spring-boot/docs/3.2.1/reference/htmlsingle/index.html#web.security) | ||
* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/3.2.1/reference/htmlsingle/index.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/) | ||
* [Securing a Web Application](https://spring.io/guides/gs/securing-web/) | ||
* [Spring Boot and OAuth2](https://spring.io/guides/tutorials/spring-boot-oauth2/) | ||
* [Authenticating a User with LDAP](https://spring.io/guides/gs/authenticating-ldap/) | ||
* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/) | ||
|
||
### Additional Links | ||
These additional references should also help you: | ||
|
||
* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle) | ||
|
Oops, something went wrong.