-
Notifications
You must be signed in to change notification settings - Fork 0
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
2차 멘토링 코드리뷰용 PR #26
Closed
2차 멘토링 코드리뷰용 PR #26
Changes from all commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
9fcda8b
env: set project file
daeun084 fef5e49
docs: update issue templates
daeun084 c466bf9
docs: create pull_request_template.md
daeun084 109ab79
feat: Environmental settings, log-in, and implementation of membershi…
L-U-Ready 838f762
Merge pull request #2 from LearnMate-Dev/feature/1-setting-up-and-log…
L-U-Ready f3ef562
:rocket: deploy config adapt
L-U-Ready 25e791b
Merge pull request #5 from LearnMate-Dev/feature/3-implements-deploy-…
L-U-Ready df638c1
:rocket: deploy config update
L-U-Ready 03a0a6e
:rocket: deploy config update
L-U-Ready 6c1b416
:rocket: deploy config update
L-U-Ready 2b4d9cd
:rocket: deploy config update
L-U-Ready 4dfc213
:rocket: deploy config update
L-U-Ready 247d65f
chore: annotation 추가
daeun084 4cbf368
add: entity 작성 및 연관관계 설정
daeun084 ee63d01
:rocket: deploy config update
L-U-Ready ad736ca
:rocket: deploy config update
L-U-Ready d9197f8
:rocket: deploy config update
L-U-Ready d46c1c9
:rocket: deploy config update
L-U-Ready 1eed326
:rocket: deploy config update
L-U-Ready 7774469
:rocket: deploy config update
L-U-Ready 09b85f0
:rocket: deploy config update
L-U-Ready 8618d7c
feat: 일기 작성 기능 임시 구현
daeun084 1d927a7
feat: 일기 수정 기능 구현
daeun084 7868497
feat: 일기 삭제 기능 구현
daeun084 94dc322
feat: 일기 상세 조회 기능 구현
daeun084 b373c18
chore: 감정 분석, 행동 요령 제안 API 호출 위치 변경
daeun084 a595580
chore: 일기 작성 기능 수정
daeun084 46782f5
chore: diary, emotion, actiontip 연관관계 설정 코드 수정
daeun084 347a121
Merge pull request #6 from LearnMate-Dev/feature/#4
daeun084 dbb782e
Merge pull request #10 from LearnMate-Dev/chore/#9
daeun084 128e9d6
add: cloud natural language api 사용을 위한 config 설정
daeun084 a92264a
feat: 감정 분석 기능 구현
daeun084 eaf8946
add: chat gpt API 연결 및 config 설정
daeun084 4dd72a3
Merge pull request #11 from LearnMate-Dev/feature/#7
daeun084 9ff0fd6
:rocket: deploy config update
L-U-Ready 1c2e590
:rocket: deploy config update
L-U-Ready 06b15db
:rocket: deploy config update
L-U-Ready 66117af
:rocket: deploy config update
L-U-Ready 0518b08
:rocket: deploy config update
L-U-Ready d4f4753
:rocket: deploy config update
L-U-Ready 0f3e82f
:rocket: deploy config update
L-U-Ready ce87286
:rocket: deploy config update
L-U-Ready ea28d24
:rocket: deploy config update
L-U-Ready 69ab6da
:rocket: deploy config update
L-U-Ready 1ac2ba1
:rocket: deploy config update
L-U-Ready b6bf1d3
:rocket: deploy config update
L-U-Ready 808fc8c
:rocket: deploy config update
L-U-Ready 9308600
:rocket: deploy config update
L-U-Ready ff02ad5
:rocket: deploy config update
L-U-Ready f992ca4
:rocket: deploy config update
L-U-Ready 7cbe547
:rocket: deploy config update
L-U-Ready 3afccb8
:rocket: deploy config update
L-U-Ready 0def0a0
:rocket: deploy config update
L-U-Ready 76d5a02
:rocket: deploy config update
L-U-Ready 88fc4ec
:rocket: deploy config update
L-U-Ready 2bcd739
:rocket: deploy config update
L-U-Ready d01537e
:rocket: deploy config update
L-U-Ready 76c2984
:rocket: deploy config update
L-U-Ready 398564a
:rocket: deploy config update
L-U-Ready 37d8ff6
:rocket: deploy config update
L-U-Ready 83513f9
:rocket: deploy config update
L-U-Ready 9f6ae7b
:rocket: deploy config update
L-U-Ready c33b135
:rocket: deploy config update
L-U-Ready 67d089f
:rocket: deploy config update
L-U-Ready aac6cd8
:rocket: deploy config update
L-U-Ready 412c4ff
:rocket: deploy config update
L-U-Ready 0368671
:rocket: deploy config update
L-U-Ready 3b000e4
:rocket: deploy config update
L-U-Ready d1349b7
:rocket: deploy config update
L-U-Ready 06c8118
:rocket: deploy config update
L-U-Ready 6e28c21
:rocket: deploy config update
L-U-Ready b6a54b1
:rocket: deploy config update
L-U-Ready e461708
:rocket: deploy config update
L-U-Ready 44e481b
:rocket: deploy config update
L-U-Ready 150aa89
:rocket: deploy config update
L-U-Ready 239592d
:bug: signIn error fix
L-U-Ready 49069d6
:bug: signIn response fix
L-U-Ready 4674f3f
:sparkles: Implement Todo (plan)
L-U-Ready c25f3dc
Merge pull request #13 from LearnMate-Dev/feature/12-implement-todo-list
L-U-Ready 074dcad
!hotfix: getEmotionAnalysis HTTP Method
daeun084 a16dedf
:rocket: secret keys add
L-U-Ready 4eafec5
:rocket: secret keys add
L-U-Ready e03d4b0
feat: 행동 요령 제안 기능 구현
daeun084 f903924
ci: update deploy config
daeun084 222eb6b
chore: userId get method 추가
daeun084 668f9dd
Merge branch 'main' into feature/#8
daeun084 f2b7539
Merge pull request #15 from LearnMate-Dev/feature/#8
daeun084 093a34e
!hotfix: userdetail import
daeun084 f918e02
!hotfix: http method 변경
daeun084 2f1be02
ci: update deploy config
daeun084 0bf3c9b
feat: 감정 분석 레포트 조회 기능 구현
daeun084 f5350eb
refactor: 모든 감정의 개수가 모두 반환되도록 수정
daeun084 3470fac
Merge pull request #17 from LearnMate-Dev/feature/#16
daeun084 da52cf2
feat: 감정 분석 레포트 상세 조회 기능 구현
daeun084 a23f318
Merge pull request #21 from LearnMate-Dev/feature/#20
daeun084 6117e96
refactor: signIn, signUp 공통 함수 분리
daeun084 c3b4908
chore: report entity 제거
daeun084 9e6374b
feat: 홈 화면 조회 기능 구현
daeun084 5b43f5f
Merge pull request #22 from LearnMate-Dev/feature/#18
daeun084 0cd11b2
:sparkles: Implement Todo Guide
L-U-Ready a53d56a
Merge pull request #23 from LearnMate-Dev/feature/14-implement-todo-g…
L-U-Ready 616a931
:rocket: git actions workflow update
L-U-Ready 057d2b9
:sparkles: Add compliment card generation feature
L-U-Ready 5fff442
Merge pull request #25 from LearnMate-Dev/feature/24-implement-compli…
L-U-Ready 3f60f5a
:recycle: Mydifing Todo List
L-U-Ready 0f9061d
:recycle: Mydifing Todo Guide
L-U-Ready File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: LearnMate issue template | ||
about: Describe this issue template's purpose here. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### ✨ 이슈 내용 | ||
> | ||
|
||
### 💡 작업 내용 | ||
- [ ] | ||
- [ ] | ||
|
||
### 📌 참고 사항 |
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,9 @@ | ||
### #️⃣ 관련 이슈 | ||
- closed # | ||
|
||
### 💡 작업내용 | ||
|
||
### 📸 스크린샷(선택) | ||
|
||
### 📝 기타 | ||
(참고사항, 리뷰어에게 전하고 싶은 말 등을 넣어주세요) |
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,84 @@ | ||
name: Deploy to EC2 | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 코드 체크아웃 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Java 버전 설정 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '21' | ||
|
||
- name: nlp.json 파일 생성 | ||
run: | | ||
touch ./src/main/resources/nlp.json | ||
echo "${{ secrets.GCP_CREDENTIALS_JSON }}" | base64 -d > ./src/main/resources/nlp.json | ||
|
||
- name: 행동 요령 제안 프롬프트 생성 | ||
run: | | ||
touch ./src/main/resources/action-tip-prompt.txt | ||
echo "${{ secrets.ACTION_TIP_PROMPT }}" > ./src/main/resources/action-tip-prompt.txt | ||
shell: bash | ||
|
||
- name: Todo Guide 프롬프트 생성 | ||
run: | | ||
touch ./src/main/resources/todo-guide-prompt.txt | ||
echo "${{ secrets.TODO_GUIDE_PROMPT }}" > ./src/main/resources/todo-guide-prompt.txt | ||
shell: bash | ||
|
||
- name: 칭찬 카드 내용 프롬프트 생성 | ||
run: | | ||
touch ./src/main/resources/compliment-card-content-prompt.txt | ||
echo "${{ secrets.COMPLIMENT_CARD_CONTENT_PROMPT }}" > ./src/main/resources/compliment-card-content-prompt.txt | ||
shell: bash | ||
|
||
- name: 칭찬 카드 제목 프롬프트 생성 | ||
run: | | ||
touch ./src/main/resources/compliment-card-title-prompt.txt | ||
echo "${{ secrets.COMPLIMENT_CARD_TITLE_PROMPT }}" > ./src/main/resources/compliment-card-title-prompt.txt | ||
shell: bash | ||
|
||
- name: Docker 로그인 | ||
run: | | ||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
|
||
- name: JIB로 Docker 이미지 빌드 및 푸시 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 좋습니다 ㅎㅎ |
||
run: | | ||
./gradlew jib --image=${{ secrets.DOCKER_USERNAME }}/learnmate:latest | ||
|
||
- name: EC2에 Docker 컨테이너 배포 | ||
run: | | ||
echo "${{ secrets.EC2_SSH_KEY }}" > ssh_key | ||
chmod 600 ssh_key | ||
ssh -o StrictHostKeyChecking=no -i ssh_key ec2-user@${{ secrets.EC2_HOST }} << 'EOF' | ||
# 최신 이미지를 가져옴. | ||
docker pull ${{ secrets.DOCKER_USERNAME }}/learnmate:latest | ||
|
||
# 기존 컨테이너 중지 및 제거 | ||
docker stop learnmate-app || true | ||
docker rm learnmate-app || true | ||
|
||
# 새 컨테이너 실행 | ||
docker run -d \ | ||
--name learnmate-app \ | ||
-p 8080:8080 \ | ||
-e DATABASE_URL=${{ secrets.DATABASE_URL }} \ | ||
-e DATABASE_USERNAME=${{ secrets.DATABASE_USERNAME }} \ | ||
-e DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }} \ | ||
-e JWT_SECRET_KEY=${{ secrets.JWT_SECRET_KEY }} \ | ||
-e JWT_ACCESS_TOKEN_EXPIRE=${{ secrets.JWT_ACCESS_TOKEN_EXPIRE }} \ | ||
-e JWT_REFRESH_TOKEN_EXPIRE=${{ secrets.JWT_REFRESH_TOKEN_EXPIRE }} \ | ||
-e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \ | ||
-e OPENAI_MODEL=${{ secrets.OPENAI_MODEL }} \ | ||
-e GCP_CREDENTIALS_LOCATION="classpath:nlp.json" \ | ||
${{ secrets.DOCKER_USERNAME }}/learnmate:latest | ||
EOF |
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,95 @@ | ||
plugins { | ||
id 'java' | ||
id 'org.springframework.boot' version '3.3.4' | ||
id 'io.spring.dependency-management' version '1.1.6' | ||
id 'com.google.cloud.tools.jib' version '3.3.2' | ||
|
||
} | ||
|
||
group = 'LearnMate' | ||
version = '0.0.1-SNAPSHOT' | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
} | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url 'https://repo.spring.io/milestone' } | ||
} | ||
|
||
ext { | ||
set('springAiVersion', "1.0.0-M2") | ||
} | ||
|
||
dependencies { | ||
runtimeOnly 'com.mysql:mysql-connector-j' | ||
|
||
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
|
||
compileOnly 'org.projectlombok:lombok' | ||
developmentOnly 'org.springframework.boot:spring-boot-devtools' | ||
annotationProcessor 'org.projectlombok:lombok' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc' | ||
testImplementation 'org.springframework.security:spring-security-test' | ||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
|
||
implementation 'mysql:mysql-connector-java:8.0.33' | ||
|
||
implementation 'me.paulschwarz:spring-dotenv:2.5.4' | ||
|
||
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.2.0' | ||
|
||
// jwt & json | ||
implementation 'io.jsonwebtoken:jjwt-api:0.11.5' | ||
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5' | ||
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5' | ||
|
||
// gson | ||
implementation 'com.google.code.gson:gson' | ||
|
||
// json | ||
implementation 'org.json:json:20230227' | ||
|
||
// google natural language | ||
implementation 'com.google.cloud:google-cloud-language:2.53.0' | ||
|
||
// open-ai | ||
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter' | ||
|
||
} | ||
|
||
dependencyManagement { | ||
imports { | ||
mavenBom "org.springframework.ai:spring-ai-bom:${springAiVersion}" | ||
} | ||
} | ||
|
||
jib { | ||
from { | ||
image = 'openjdk:21-jdk' | ||
} | ||
to { | ||
image = "${System.getenv('DOCKER_USERNAME')}/learnMate" | ||
tags = ['latest'] | ||
} | ||
container { | ||
ports = ['8080'] | ||
} | ||
} | ||
tasks.named('test') { | ||
useJUnitPlatform() | ||
} |
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,10 @@ | ||
version: '3.8' | ||
|
||
services: | ||
app: | ||
image: ${DOCKER_USERNAME}/learnmate:latest | ||
container_name: learnmate-app | ||
ports: | ||
- "8080:8080" | ||
env_file: | ||
- .env |
Binary file not shown.
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,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EC2 스펙을 어떤걸 사용하는지 모르곘으나, t2.micro와 같은 낮은 사양에서는 'docker prune'과 같은 명령어를 통해 디스크를 확보해두는게 안정적입니다!