Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: develop -> prod 머지 #155

Closed
wants to merge 81 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
3961fef
feat: 프로젝트 세팅
GaBaljaintheroom May 26, 2024
7b0d54d
Update 기능-이슈.md
GaBaljaintheroom May 26, 2024
9056251
Update 기능-이슈.md
GaBaljaintheroom May 26, 2024
6ded9dd
Update 버그-이슈.md
GaBaljaintheroom May 26, 2024
1c9e85e
Update 버그-이슈.md
GaBaljaintheroom May 26, 2024
201f6d6
refactor: pr 리뷰 후 수정
GaBaljaintheroom May 27, 2024
512b2df
Merge branch 'develop' of https://github.com/YAPP-Github/24th-App-Tea…
GaBaljaintheroom May 27, 2024
ee4c238
refactor: 프로젝트 세팅 수정
GaBaljaintheroom May 28, 2024
4a84e57
refactor: 기능 이슈 수정
GaBaljaintheroom May 29, 2024
c4d228f
feat: 프로젝트 세팅 (#8)
devmizz May 30, 2024
8a24674
feat : Swagger, Querydsl 세팅 (#9)
GaBaljaintheroom May 30, 2024
cace65f
feat: 전역 에러 설정 (#6)
devmizz May 30, 2024
49ae26b
feat : 기본 Ci 설정 (#12)
GaBaljaintheroom May 31, 2024
9ba1bdb
feat: Setting logback (#15)
devmizz Jun 2, 2024
114c759
feat: Setting checkstyle (#17)
devmizz Jun 3, 2024
1103652
feat: 스프링 시큐리티 기본 설정 및 토큰 기능 구현 (#13)
devmizz Jun 4, 2024
7c1ef11
feat : redis 연동 및 로그인 (#19)
GaBaljaintheroom Jun 15, 2024
7179f06
feat : 엔티티 세팅 (#22)
GaBaljaintheroom Jun 21, 2024
ae8d468
feat: Mock API (#23)
devmizz Jun 23, 2024
e1b9ab9
feat : 어드민 genre, artist CRUD 기능 구현 (#25)
GaBaljaintheroom Jul 7, 2024
893e183
feat: dev cd (#27)
devmizz Jul 10, 2024
87a3caf
feat: Update cd script (#33)
devmizz Jul 16, 2024
6f0af43
feat : 어드민 가입 기능 구현 (#29)
GaBaljaintheroom Jul 16, 2024
4453884
feat: Update deploy directory (#38)
devmizz Jul 16, 2024
ca93202
fix: Update develop server directory structure (#39)
devmizz Jul 16, 2024
d1264e1
feat : 어드민 show CRUD 구현 (#32)
GaBaljaintheroom Jul 20, 2024
22b00f1
feat : dev,prod yml 추가 (#42)
GaBaljaintheroom Jul 20, 2024
bab7a43
feat: User authentication (#41)
devmizz Jul 20, 2024
b97bcd1
refactor : dev, prod ci-cd 수정 (#43)
GaBaljaintheroom Jul 20, 2024
cd8f170
fix : github action cloud.yml 오류 수정 (#46)
GaBaljaintheroom Jul 20, 2024
7eabcb4
fix: Update cd, cd script (#48)
devmizz Jul 20, 2024
75fd349
feat: db setting (#50)
devmizz Jul 21, 2024
6227a87
fix: Update docker-compose-dev (#54)
devmizz Jul 21, 2024
6b948f4
feat: Subscribe artist (#52)
devmizz Jul 25, 2024
39f2d39
feat: artist subscription (#57)
devmizz Jul 27, 2024
0a9d4e7
feat : 사용자 검색 기능 구현 (#58)
GaBaljaintheroom Jul 28, 2024
78bf2dd
feat : 사용자 장르 연관 기능 구현 (#60)
GaBaljaintheroom Jul 29, 2024
9b83959
refactor : 아티스트 성별 중 혼성 추가 (#66)
GaBaljaintheroom Aug 3, 2024
5fe52cd
feat: 공연 상세 조회 (#71)
devmizz Aug 4, 2024
bb0f138
feat : 구독하지 않은 정보 조회 (#62)
GaBaljaintheroom Aug 5, 2024
e4f28b1
feat: 장르, 아티스트 데이터 초기화 (#74)
devmizz Aug 7, 2024
ae41cd5
fix : 공연 어드민 기능 오류 수정 (#76)
GaBaljaintheroom Aug 7, 2024
b8faed4
fix : dev 환경에서 redis 연동 수정 (#82)
GaBaljaintheroom Aug 10, 2024
7944955
feat : 향상된 도커 파일로 변경 (#90)
GaBaljaintheroom Aug 10, 2024
862cf19
feat : 메시지 큐 모듈 적용 (#81)
GaBaljaintheroom Aug 10, 2024
bac8baa
fix : 공연 상세 조회 리스트 쿼리 수정 (#84)
GaBaljaintheroom Aug 10, 2024
51ac459
feat : 유저 프로필 기능 구현 (#87)
GaBaljaintheroom Aug 10, 2024
3fa96da
fix : 아티스트 구독하지 않은 목록 인증/인가 수정 (#91)
GaBaljaintheroom Aug 10, 2024
4d68c03
feat: 공연 목록 조회 (#93)
devmizz Aug 11, 2024
933a7e0
feat: 공연 목록 조회 (#95)
devmizz Aug 11, 2024
14e10c9
fix : docker compose dev (#97)
GaBaljaintheroom Aug 11, 2024
4bcd25d
fix : 레디스 네트워크 연동 (#98)
GaBaljaintheroom Aug 12, 2024
7431d73
feat : 토큰 재발급 API 추가 (#100)
GaBaljaintheroom Aug 12, 2024
559ed4b
fix : redis sub request (#102)
GaBaljaintheroom Aug 12, 2024
75cac87
feat: 관심 공연 (#105)
devmizz Aug 15, 2024
c76fa4a
feat : 공연 티켓팅 알림 등록 및 조회 (#107)
GaBaljaintheroom Aug 15, 2024
d2dbeab
feat: CD in prod (#108)
devmizz Aug 17, 2024
01801e3
feat: 공연 알림 목록 조회 구현 (#110)
GaBaljaintheroom Aug 18, 2024
58302ce
feat: 개수 조회 API (#113)
devmizz Aug 19, 2024
23cd82f
feat: 티켓팅 알림 설정 후 종료된 공연 목록, 개수 API (#114)
GaBaljaintheroom Aug 21, 2024
0659f8a
fix: 공연 업데이트 오류 문제 (#116)
GaBaljaintheroom Aug 24, 2024
9e4f1cb
fix: 공연 조회수 어뷰징 문제 (#118)
GaBaljaintheroom Aug 24, 2024
a07a849
fix: 상세 조회 응답 필드 수정 (#122)
GaBaljaintheroom Aug 24, 2024
d473c36
refactor: 아티스트 응답 필드 추가 (#124)
GaBaljaintheroom Aug 25, 2024
9a19e6e
fix: Update config (#127)
devmizz Aug 25, 2024
94d13db
fix: 구독 알림 메시지 Publish 필드 누락 (#128)
GaBaljaintheroom Aug 25, 2024
7421c6b
fix: 티켓팅 메시지 publish 필드 수정 (#130)
GaBaljaintheroom Aug 26, 2024
e178b37
feat: 장르 전체 목록 조회 기능 구현 (#132)
GaBaljaintheroom Aug 26, 2024
5eb88e4
refactor: 초기 데이터 수정 (#133)
GaBaljaintheroom Aug 27, 2024
7aff7b5
fix: 공연 전체 목록 조회 기능 수정 (#136)
GaBaljaintheroom Aug 27, 2024
e390fd7
feat: 데이터 삽입 (#137)
GaBaljaintheroom Aug 27, 2024
9addc2e
fix: 공연 목록 조회 쿼리 수정 (#138)
GaBaljaintheroom Aug 28, 2024
cf5932c
refactor: 공연 관심 설정 응답 필드 추가 (#140)
GaBaljaintheroom Aug 28, 2024
817fe45
fix: 공연 데이터 수정 (#141)
GaBaljaintheroom Aug 28, 2024
195537f
refactor: 더미데이터 수정 (#142)
GaBaljaintheroom Aug 29, 2024
9f6de36
refactor: 닉네임 수정 (#143)
GaBaljaintheroom Aug 30, 2024
260b230
refactor: 실제 내한 공연 수정 (#144)
GaBaljaintheroom Aug 30, 2024
a18a2af
refactor: 공연 검색 수정 (#145)
GaBaljaintheroom Aug 30, 2024
3c9c645
fix: 공연 티켓팅 알림, 관심 등록 예외 처리 추가 (#147)
GaBaljaintheroom Sep 3, 2024
b2abaeb
fix: 공연 알림 설정 수정 (#148)
GaBaljaintheroom Sep 4, 2024
059cb9c
feat: Withdraw user (#150)
devmizz Sep 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/기능-이슈.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: 기능 이슈
about: 기능 관련 이슈
title: 'feat:'
labels: 'feat'
assignees: ''
---

## 💡 이슈
<!--어떤 작업을 하는지 작성해주세요.-->

## 📝 투두
<!-- 상세한 작업으로 구분하여 나누어주세요. -->
- [ ]
- [ ]

## 🎸 기타
<!--추가로 하고싶은 말을 작성해주세요.-->
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/버그-이슈.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: 버그 이슈
about: 버그 관련 이슈
title: 'fix:'
labels: 'fix'
assignees: ''
---

# 어떤 버그인가요?

-

## 예상 결과

-

## 실제 결과

-

## 스크린샷

![]()

14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## 😋 작업한 내용

-

## 🙏 PR Point

-

## 👍 관련 이슈

- Resolved : #


---
113 changes: 113 additions & 0 deletions .github/workflows/showpot-dev-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: ShowPot-Dev-CD

on:
push:
branches:
- develop
- hotfix/**

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'liberica'
cache: gradle

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Copy Secrets
uses: microsoft/variable-substitution@v1
with:
files: |
./app/src/main/resources/application-dev.yml,
./app/src/main/resources/application-cloud-dev.yml,
./app/domain/common-domain/src/main/resources/application-domain-dev.yml
env:
token.secret-key: ${{ secrets.TOKEN_SECRET_KEY }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_KEY }}
cloud.aws.region: ${{ secrets.AWS_REGION }}
cloud.aws.s3.bucket: ${{ secrets.AWS_BUCKET }}
spring.datasource.url: ${{ secrets.APPLICATION_DATASOURCE_URL_DEV }}
spring.datasource.username: ${{ secrets.APPLICATION_DATASOURCE_USERNAME }}
spring.datasource.password: ${{ secrets.APPLICATION_DATASOURCE_PASSWORD }}

- name: Build with Gradle Wrapper
run: ./gradlew clean build -Dspring.profiles.active=dev

- name: Prepare File for Deployment
run: |
mkdir -p deployment/app/build/libs
cp dockerfile-dev docker-compose-dev.yml deployment/
cp -r ./app/build/libs deployment/app/build

- name: Get Github Actions IP
id: ip
uses: candidob/[email protected]

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ap-northeast-2

- name: Add Github Actions IP on Security Group
run: |
aws ec2 authorize-security-group-ingress --group-id ${{ secrets.AWS_DEV_SECURITY_GROUP_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32

- name: Upload files to EC2
uses: appleboy/[email protected]
with:
host: ${{ secrets.EC2_DEV_HOST }}
username: ec2-user
key: ${{ secrets.EC2_DEV_SSH_PRIVATE_KEY }}
source: "deployment/*"
target: "/home/ec2-user/"

- name: Deploy using Docker Compose
uses: appleboy/[email protected]
with:
host: ${{ secrets.EC2_DEV_HOST }}
username: ec2-user
key: ${{ secrets.EC2_DEV_SSH_PRIVATE_KEY }}
script: |
cd /home/ec2-user/deployment/
docker-compose -f docker-compose-dev.yml down
docker system prune -f
docker-compose -f docker-compose-dev.yml up -d --build

- name: Remove Github Actions IP from Security Group
if: always()
run: |
aws ec2 revoke-security-group-ingress --group-id ${{ secrets.AWS_DEV_SECURITY_GROUP_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32

- name: Backend CD for Dev Server Discord Notification
uses: sarisia/actions-status-discord@v1
if: success()
with:
title: ✅ 개발 서버 배포 프로세스가 완료되었습니다! ✅
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: "<@1084774841460215839> <@281597829636423682> 배포가 정상적으로 이뤄졌는지 확인해주세요!"
color: 00FF00
username: showPot-Bot
avatar_url: ${{ secrets.DISCORD_NOTIFICATION_SUCCESS_AVATAR_URL }}

- name: Backend CD for Dev Server Discord Notification
uses: sarisia/actions-status-discord@v1
if: failure()
with:
title: ❗️개발 서버 배포 프로세스가 실패했습니다! ❗️
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
color: FF0000
username: showPot-Bot
avatar_url: ${{ secrets.DISCORD_NOTIFICATION_FAILED_AVATAR_URL }}
65 changes: 65 additions & 0 deletions .github/workflows/showpot-dev-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ShowPot-Dev-CI

on:
pull_request:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'liberica'
cache: gradle

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Copy Secrets
uses: microsoft/variable-substitution@v1
with:
files:
./app/src/main/resources/application-dev.yml,
./app/src/main/resources/application-cloud-dev.yml,
./app/domain/common-domain/src/main/resources/application-domain-dev.yml
env:
token.secret-key: ${{ secrets.TOKEN_SECRET_KEY }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_KEY }}
cloud.aws.region: ${{ secrets.AWS_REGION }}
cloud.aws.s3.bucket: ${{ secrets.AWS_BUCKET }}
spring.datasource.url: ${{ secrets.APPLICATION_DATASOURCE_URL_DEV }}
spring.datasource.username: ${{ secrets.APPLICATION_DATASOURCE_USERNAME }}
spring.datasource.password: ${{ secrets.APPLICATION_DATASOURCE_PASSWORD }}

- name: Build with Gradle Wrapper
run: ./gradlew clean build -Dspring.profiles.active=dev

- name: Backend CI Discord Notification
uses: sarisia/actions-status-discord@v1
if: success()
with:
title: ✅ Backend CI success ✅
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: "<@1084774841460215839> <@281597829636423682> ShoPot 이슈 혹은 PR을 확인해주세요!"
color: 00FF00
username: showPot-Bot
avatar_url: ${{ secrets.DISCORD_NOTIFICATION_SUCCESS_AVATAR_URL }}

- name: Backend CI Discord Notification
uses: sarisia/actions-status-discord@v1
if: failure()
with:
title: ❗️Backend CI failed ❗️
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
color: FF0000
username: showPot-Bot
avatar_url: ${{ secrets.DISCORD_NOTIFICATION_FAILED_AVATAR_URL }}
98 changes: 98 additions & 0 deletions .github/workflows/showpot-prod-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: prod-cd

on:
push:
branches:
- prod

env:
AWS_REGION: ap-northeast-2
ECR_REPOSITORY: showpot-application

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'liberica'
cache: gradle

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Copy Secrets
uses: microsoft/variable-substitution@v1
with:
files: |
./app/src/main/resources/application-prod.yml,
./app/src/main/resources/application-cloud-prod.yml,
./app/domain/common-domain/src/main/resources/application-domain-prod.yml
env:
token.secret-key: ${{ secrets.TOKEN_SECRET_KEY }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_KEY }}
cloud.aws.region: ${{ secrets.AWS_REGION }}
cloud.aws.s3.bucket: ${{ secrets.AWS_BUCKET }}
spring.datasource.url: ${{ secrets.APPLICATION_DATASOURCE_URL_PROD }}
spring.datasource.username: ${{ secrets.APPLICATION_DATASOURCE_USERNAME }}
spring.datasource.password: ${{ secrets.APPLICATION_DATASOURCE_PASSWORD }}
spring.data.redis.host: ${{ secrets.REDIS_HOST_PROD }}
spring.data.redis.port: ${{ secrets.REDIS_PORT_PROD }}

- name: Build with Gradle Wrapper
run: ./gradlew clean build -Dspring.profiles.active=prod

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Set image tag
id: set-tag
run: |
DATE_TAG=$(TZ='Asia/Seoul' date +'%Y%m%d_%H%M')
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-8)
echo "IMAGE_TAG=${DATE_TAG}_${SHORT_SHA}" >> $GITHUB_ENV

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build and Push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ env.IMAGE_TAG }}
run: |
docker build --no-cache -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f dockerfile-prod .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
IMAGE_URI=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "IMAGE_URI=$IMAGE_URI" >> $GITHUB_ENV

- name: Update ECS task definition
id: update-task
run: |
TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition showpot-core --region $AWS_REGION)
NEW_TASK_DEFINITION=$(echo $TASK_DEFINITION | jq --arg IMAGE_URI "$IMAGE_URI" '
.taskDefinition |
.containerDefinitions[0].image=$IMAGE_URI |
del(.taskDefinitionArn, .revision, .status, .requiresAttributes, .compatibilities, .registeredAt, .registeredBy)')
echo $NEW_TASK_DEFINITION > new-task-def.json
REGISTERED_TASK_DEFINITION=$(aws ecs register-task-definition --cli-input-json file://new-task-def.json)
TASK_REVISION=$(echo $REGISTERED_TASK_DEFINITION | jq -r '.taskDefinition.taskDefinitionArn')

echo "Registered new task definition revision: $TASK_REVISION"
echo "TASK_REVISION=$TASK_REVISION" >> $GITHUB_ENV

- name: Deploy to ECS service
run: |
aws ecs update-service --cluster showpot-cluster --service showpot-core-service --task-definition $TASK_REVISION --force-new-deployment --region $AWS_REGION
Loading
Loading