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

hotfix: S3, AWS 자격증명 수정 #264

Closed
wants to merge 18 commits into from
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,4 @@ src/main/resources/config
!application-test.yml
src/main/generated
dump.rdb
/src/main/resources/firebase-local.json
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,54 @@
# moabam-BE
## 🐥 MOABAM 서비스

![img.png](readme-image/img.png)

![img_1.png](readme-image/img_1.png)

<br><br>

## 👨‍👨‍👧 Backend Team 소개

| 김영명 | 김희빈(PO) | 박세연 | 신재윤 | 홍혁준(SM) |
|:------------------------------------------------------------------------------:|:------------------------------------------------------------------------------:|:------------------------------------------------------------------------------:|:------------------------------------------------------------------------------:|:------------------------------------------------------------------------------:|
| DEVELOPER | DEVELOPER | DEVELOPER | DEVELOPER | DEVELOPER |
| <img src="https://avatars.githubusercontent.com/u/83266154?v=4" width="250" /> | <img src="https://avatars.githubusercontent.com/u/72112845?v=4" width="250" /> | <img src="https://avatars.githubusercontent.com/u/54196094?v=4" width="250" /> | <img src="https://avatars.githubusercontent.com/u/87688023?v=4" width="250" /> | <img src="https://avatars.githubusercontent.com/u/31675711?v=4" width="250" /> |
| [ymkim97](https://github.com/ymkim97) | [kmebin](https://github.com/kmebin) | [parksey](https://github.com/parksey) | [DevUni](https://github.com/Shin-Jae-Yoon) | [HongDosan](https://github.com/HyuckJuneHong) |
| 방 도메인, 루틴 인증(메인) | 상품 도메인, 결제, 에러 알림, BE 팀장 | 회원 도메인, 랭킹 어드민 페이지 | 방 도메인, 루틴 인증(서브), 인프라 (AWS, CI/CD) | 쿠폰 도메인, 알림, 선착순 이벤트, 캐싱 |

<br><br>

## 공통 협업 방식

![img.png](readme-image/협업.png)

## 서비스 아키텍처

![img.png](readme-image/서비스-아키텍처.png)

## CI/CD 파이프라인

![img.png](readme-image/파이프라인.png)

## 테이블 아키텍처

![img.png](readme-image/table.png)

## API 명세

![img.png](readme-image/api.png)

## 컨벤션

![img_1.png](readme-image/컨벤션.png)

## Config 관리

![img.png](readme-image/콘피그.png)

## Test

![img.png](readme-image/테스트.png)

## 협업 규칙
![image](https://github.com/team-moabam/moabam-BE/assets/31675711/1c9ae816-9174-42fd-959a-bad9f375878d)

111 changes: 51 additions & 60 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'org.sonarqube' version '4.4.1.3373'
id 'jacoco'
id 'checkstyle'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'com.epages.restdocs-api-spec' version '0.18.4'
}

group = 'com.moabam'
Expand All @@ -15,21 +15,27 @@ java {
sourceCompatibility = '17'
}

ext {
snippetsDir = file('build/generated-snippets')
compileJava {
options.compilerArgs << '-parameters'
options.encoding = 'UTF-8'
}

compileTestJava {
options.compilerArgs << '-parameters'
options.encoding = 'UTF-8'
}

def querydslSrcDir = 'src/main/generated'

clean {
delete file(querydslSrcDir)
}

tasks.withType(JavaCompile) {
options.generatedSourceOutputDirectory = file(querydslSrcDir)
}

configurations {
asciidoctorExtensions

compileOnly {
extendsFrom annotationProcessor
}
Expand Down Expand Up @@ -58,7 +64,14 @@ dependencies {

// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.11.0'
testImplementation 'com.squareup.okhttp3:mockwebserver'

// RestDocs
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'com.epages:restdocs-api-spec-mockmvc:0.18.4'

// Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'

// Querydsl
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
Expand All @@ -75,6 +88,9 @@ dependencies {
// Apache Commons Lang 3
implementation 'org.apache.commons:commons-lang3:3.13.0'

// Cache
implementation 'org.springframework.boot:spring-boot-starter-cache'

// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'

Expand All @@ -92,12 +108,6 @@ dependencies {
// JSON parser
implementation 'org.json:json:20230618'

// Asciidoctor
asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor'

// RestDocs
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'

// S3
implementation platform("io.awspring.cloud:spring-cloud-aws-dependencies:3.0.2")
implementation 'io.awspring.cloud:spring-cloud-aws-starter-s3'
Expand All @@ -110,9 +120,6 @@ dependencies {

// Logback Slack Appender
implementation 'com.github.maricn:logback-slack-appender:1.6.1'

// Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
}

tasks.named('test') {
Expand All @@ -134,28 +141,25 @@ jacocoTestReport {

afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
"**/*Application*",
"**/*Config*",
"**/*Request*",
"**/*Response*",
"**/*Exception*",
"**/*Mapper*",
"**/*ErrorMessage*",
"**/*DynamicQuery*",
"**/*BaseTimeEntity*",
"**/*HealthCheckController*",
"**/*S3Manager*",
] + Qdomains)
})
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
"**/*Application*",
"**/*Config*",
"**/*Request*",
"**/*Response*",
"**/*Exception*",
"**/*Mapper*",
"**/*ErrorMessage*",
"**/*DynamicQuery*",
"**/*BaseTimeEntity*",
"**/*HealthCheckController*",
"**/*S3Manager*",
] + Qdomains)
})
)
}
}

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

tasks.withType(Checkstyle).configureEach {
reports {
xml.required = true
Expand All @@ -177,37 +181,24 @@ sonar {
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.coverage.jacoco.xmlReportPaths', 'build/reports/jacoco/test/jacocoTestReport.xml'
property 'sonar.coverage.exclusions', '**/test/**, **/Q*.java, **/*Doc*.java, **/resources/** ' +
',**/*Application*.java , **/*Config*.java, **/*Request*.java, **/*Response*.java ,**/*Exception*.java ' +
',**/*ErrorMessage*.java, **/*Mapper*.java, **/*DynamicQuery*, **/*BaseTimeEntity*, **/*HealthCheckController* ' +
', **/*S3Manager*.java'
',**/*Application*.java , **/*Config*.java, **/*Request*.java, **/*Response*.java ,**/*Exception*.java ' +
',**/*ErrorMessage*.java, **/*Mapper*.java, **/*DynamicQuery*, **/*BaseTimeEntity*, **/*HealthCheckController* ' +
', **/*S3Manager*.java'
property 'sonar.java.checkstyle.reportPaths', 'build/reports/checkstyle/main.xml'
}
}

test {
outputs.dir snippetsDir
}
openapi3 {
servers = [
{ url = 'http://localhost:8080' },
{ url = 'http://dev.moabam.com' }
]

asciidoctor {
configurations 'asciidoctorExtensions'
inputs.dir snippetsDir
dependsOn test
}
title = 'MOABAM API DOCS'
format = 'json'

asciidoctor.doFirst {
delete file('src/main/resources/static/docs')
}

tasks.register('copyDocument', Copy) {
dependsOn asciidoctor
from file("build/docs/asciidoc")
into file("src/main/resources/static/docs")
}

bootJar {
dependsOn copyDocument
}

build {
dependsOn copyDocument
copy {
from 'build/api-spec'
into 'src/main/resources/static/docs'
}
}
3 changes: 2 additions & 1 deletion infra/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ ARG SPRING_ACTIVE_PROFILES
ENV SPRING_ACTIVE_PROFILES ${SPRING_ACTIVE_PROFILES}

COPY build/libs/moabam-server-0.0.1-SNAPSHOT.jar moabam.jar
COPY src/main/resources/config/agent.java/ agent.java

ENTRYPOINT ["java", "-jar", "-Duser.timezone=Asia/Seoul", "-Dspring.profiles.active=${SPRING_ACTIVE_PROFILES}", "/moabam.jar"]
ENTRYPOINT ["java", "-javaagent:agent.java/scouter.agent.jar", "-Dsocuter.config=agent.java/conf/scouter.conf", "-jar", "-Duser.timezone=Asia/Seoul", "-Dspring.profiles.active=${SPRING_ACTIVE_PROFILES}", "/moabam.jar"]
Loading
Loading