Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a17d1b8
chore: Swagger UI 설정
young0311 Oct 6, 2026
cf94d6c
chore: Swagger UI 전용 Docker 이미지 구성
young0311 Oct 6, 2026
2371b50
refactor: common 디렉터리를 framey-common으로 네임 변경
young0311 Oct 12, 2026
9341a1f
refacotr: 프로젝트 모듈 구조 개선
young0311 Oct 12, 2026
08d3968
fix: Swagger 공통 설정 ErrorCodeExample 코드 수정
young0311 Oct 12, 2026
53db4c1
fest: user-service 모듈 생성
young0311 Oct 12, 2026
2534037
feat: MemberService Test 실행 모듈 추가
young0311 Oct 14, 2026
f6dd836
fix: MemberService 테스트 실행 모듈 에러 해결
young0311 Oct 16, 2026
cf0ad68
feat: Collage 서비스 모듈 추가
young0311 Oct 16, 2026
4970050
feat: CollageService Test 실행 모듈 추가
young0311 Oct 17, 2026
d04a61e
feat: ArchiveService 모듈 추가
young0311 Oct 17, 2026
8b2882a
chore: Local/Test PostgreSQL 개발 환경 분리 및 Docker Compose 구성
young0311 Oct 17, 2026
c025623
chore : 서비스별 application-dev.yaml 추가
young0311 Oct 19, 2026
2b44d4d
chore: 서비스별 dockerfile 추가 및 dev 환경 compose 파일 추가
young0311 Oct 19, 2026
7900057
feat: Nginx 리버스 프록시 설정 추가
young0311 Oct 19, 2026
e5c2fad
deploy: dev 환경 CI/CD 파이프라인 구성
young0311 Oct 19, 2026
edf2bbe
fix: pr-ci에 PostgreSQL 서비스 추가
young0311 Oct 19, 2026
fa305d6
fix: pr-ci에 PostgreSQL 비밀번호 수정 및 dev 배포 워크플로우 수
young0311 Oct 19, 2026
b80cb0c
fix:dev-deploy YAML 구문 오류 수정
young0311 Oct 19, 2026
1ec6a2e
fix: 각 서비스 모듈 DockerFile 수정/Gradle 캐시 Lock 설정
young0311 Oct 19, 2026
e929048
fix: 각 서비스 모듈 내 application-dev postgre DB 재설정
young0311 Oct 19, 2026
39bf799
chore: dev환경의 배포 파이프라인 브렌치 변경
young0311 Oct 19, 2026
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
30 changes: 30 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 빌드 산출물
build/
out/
**/build/
**/out/

# Gradle
.gradle/

# IDE
.idea/
*.iml

# Git
.git
.gitignore

# OS
.DS_Store

# 환경변수 파일 제외
framey-env/

# Spring Boot 로컬 설정 제외
**/application-local.yml
**/application-local.yaml

# 빌드에 불필요한 파일
*.pem
*.md
135 changes: 135 additions & 0 deletions .github/workflows/dev-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Dev Deploy

on:
push:
branches: [dev]

jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
member: ${{ steps.filter.outputs.member }}
collage: ${{ steps.filter.outputs.collage }}
archive: ${{ steps.filter.outputs.archive }}
swagger: ${{ steps.filter.outputs.swagger }}
nginx: ${{ steps.filter.outputs.nginx }}
steps:
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
shared: &shared
- 'framey-common/**'
- 'framey-web/**'
- 'framey-monitoring/**'
- 'build.gradle'
- 'settings.gradle'
- 'gradle/**'
member:
- *shared
- 'framey-application/member-service/**'
collage:
- *shared
- 'framey-application/collage-service/**'
archive:
- *shared
- 'framey-application/archive-service/**'
swagger:
- 'framey-infrastructure/swagger-dev/**'
nginx:
- 'framey-infrastructure/nginx/**'

deploy:
needs: detect-changes
runs-on: ubuntu-latest
if: |
needs.detect-changes.outputs.member == 'true' ||
needs.detect-changes.outputs.collage == 'true' ||
needs.detect-changes.outputs.archive == 'true' ||
needs.detect-changes.outputs.swagger == 'true' ||
needs.detect-changes.outputs.nginx == 'true'

steps:
- name: Build target services list
id: targets
run: |
SERVICES=""
if [ "${{ needs.detect-changes.outputs.member }}" == "true" ]; then
SERVICES="$SERVICES member-dev"
fi
if [ "${{ needs.detect-changes.outputs.collage }}" == "true" ]; then
SERVICES="$SERVICES collage-dev"
fi
if [ "${{ needs.detect-changes.outputs.archive }}" == "true" ]; then
SERVICES="$SERVICES archive-dev"
fi
if [ "${{ needs.detect-changes.outputs.swagger }}" == "true" ]; then
SERVICES="$SERVICES swagger-dev"
fi
if [ "${{ needs.detect-changes.outputs.nginx }}" == "true" ]; then
SERVICES="$SERVICES nginx"
fi
echo "services=$SERVICES" >> $GITHUB_OUTPUT

- name: Deploy to DEV EC2
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.DEV_EC2_HOST }}
username: ${{ secrets.DEV_EC2_USER }}
key: ${{ secrets.DEV_EC2_SSH_KEY }}
script: |
cd /home/ec2-user/Framey-Server

git pull origin dev

export DEV_DB_URL="${{ secrets.DEV_DB_URL }}"
export DEV_DB_USER="${{ secrets.DEV_DB_USER }}"
export DEV_DB_PASSWORD="${{ secrets.DEV_DB_PASSWORD }}"

docker compose \
-f framey-infrastructure/docker/dev/docker-compose.dev.yaml \
up -d --build --no-deps ${{ steps.targets.outputs.services }}

- name: Health Check
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.DEV_EC2_HOST }}
username: ${{ secrets.DEV_EC2_USER }}
key: ${{ secrets.DEV_EC2_SSH_KEY }}
script: |
sleep 30

SERVICES="${{ steps.targets.outputs.services }}"

check_health() {
local name=$1
local port=$2
for i in $(seq 1 20); do
if docker exec framey-dev-${name} \
wget -qO- http://localhost:${port}/actuator/health 2>/dev/null \
| grep -q '"status":"UP"'; then
echo "✅ ${name} is healthy"
return 0
fi
sleep 5
done
echo "❌ ${name} health check failed"
docker logs --tail=50 framey-dev-${name}
return 1
}

FAILED=0

if echo "$SERVICES" | grep -q "member-dev"; then
check_health "member" 8081 || FAILED=1
fi
if echo "$SERVICES" | grep -q "collage-dev"; then
check_health "collage" 8082 || FAILED=1
fi
if echo "$SERVICES" | grep -q "archive-dev"; then
check_health "archive" 8083 || FAILED=1
fi

exit $FAILED
43 changes: 43 additions & 0 deletions .github/workflows/pr-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# pr 올렸을때 작동 workflow
name: PR CI

on:
#dev 브렌치
pull_request:
branches: [dev]

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: framey_test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U test"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: gradle

- run: chmod +x gradlew

- run: ./gradlew clean test check --no-daemon
env:
TEST_DB_URL: jdbc:postgresql://localhost:5432/framey_test
TEST_DB_USER: test
TEST_DB_PASSWORD: test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ bin/
.env
.env.*
!.env.example
### env 폴더 추적 제외 ###
framey-env/

### OS ###
.DS_Store
Expand All @@ -46,4 +48,4 @@ Thumbs.db
logs/

### Local Docker Data ###
**/docker/**/data/
**/docker/**/data/
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ subprojects {
toolVersion = '10.26.1'

configFile = rootProject.file(
'common/checkstyle/naver-checkstyle-rules.xml'
'framey-common/checkstyle/naver-checkstyle-rules.xml'
)

maxWarnings = 0
Expand All @@ -55,7 +55,7 @@ subprojects {

configProperties = [
'suppressionFile': rootProject
.file('common/checkstyle/naver-checkstyle-suppressions.xml')
.file('framey-common/checkstyle/naver-checkstyle-suppressions.xml')
.absolutePath
]
}
Expand All @@ -70,4 +70,4 @@ subprojects {
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
}
}

This file was deleted.

This file was deleted.

8 changes: 4 additions & 4 deletions docs/common/Swagger적용관련문서.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

### 서비스 모듈 의존성 추가

Swagger를 사용할 각 서비스 모듈의 `build.gradle`에 `common-web` 의존성을 추가합니다.
Swagger를 사용할 각 서비스 모듈의 `build.gradle`에 `framey-web` 의존성을 추가합니다.

```gradle
dependencies {
implementation project(':common:common-web')
implementation project(':framey-web')
}
```

`common-web`에는 다음 의존성이 포함되어 있습니다.
`framey-web`에는 다음 의존성이 포함되어 있습니다.

```gradle
api 'org.springframework.boot:spring-boot-starter-web'
Expand Down Expand Up @@ -91,7 +91,7 @@ http://localhost:{서비스 포트}/swagger
http://localhost:{서비스 포트}/v3/api-docs
```

`common-web`과 같이 독립적으로 실행되지 않는 공통 라이브러리 모듈에는 별도의 Swagger 주소가 생성되지 않습니다.
`framey-web`과 같이 독립적으로 실행되지 않는 공통 라이브러리 모듈에는 별도의 Swagger 주소가 생성되지 않습니다.

#### 개발 환경

Expand Down
16 changes: 8 additions & 8 deletions docs/common/로깅시스템구축관련문서.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### 기능

`common-monitoring` 기능
`framey-monitoring` 기능

- **TraceId 생성**
- HTTP 요청마다 고유 랜덤 TraceId를 생성.
Expand All @@ -29,16 +29,16 @@
```gradle
rootProject.name = 'server'

include ':common:common-monitoring'
include ':framey-monitoring'
//ex) include 'identity-service' : identity-service 모듈 추가
```

#### 2. `build.gradle`에 의존성을 추가합니다
새로운 서비스 모듈의 `build.gradle`에 `common-monitoring`을 의존성으로 추가해야
새로운 서비스 모듈의 `build.gradle`에 `framey-monitoring`을 의존성으로 추가해야

```gradle
dependencies {
implementation project(':common:common-monitoring')
implementation project(':framey-monitoring')
}
```

Expand Down Expand Up @@ -67,16 +67,16 @@ spring:

#### 4. Logback 설정

`common-monitoring`에 기본 `logback-spring.xml`이 포함되어 있으므로, 별도의 Logback 파일이 없어도 공통 설정이 자동으로 각모듈에 적용됩니다.
`framey-monitoring`에 기본 `logback-spring.xml`이 포함되어 있으므로, 별도의 Logback 파일이 없어도 공통 설정이 자동으로 각모듈에 적용됩니다.
서비스에서 별도의 `logback-spring.xml`을 추가하면,
`common-monitoring`의 기본 설정 대신 해당 설정이 적용됩니다.
`framey-monitoring`의 기본 설정 대신 해당 설정이 적용됩니다.

##### (참고) 공통 Logback 설정 관련

공통 Logback 설정파일은 `common-monitoring`내에 있습니다.
공통 Logback 설정파일은 `framey-monitoring`내에 있습니다.

```text
common/common-monitoring/
framey-monitoring/
└── src/main/resources/
└── logback-spring.xml
```
Expand Down
15 changes: 15 additions & 0 deletions framey-application/archive-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM eclipse-temurin:21-jdk-alpine AS build
WORKDIR /app
COPY . .
RUN chmod +x ./gradlew
RUN --mount=type=cache,target=/root/.gradle,sharing=locked \
./gradlew :framey-application:archive-service:bootJar --no-daemon

# Runtime Stage
FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
COPY --from=build \
/app/framey-application/archive-service/build/libs/*.jar \
app.jar
EXPOSE 8083
ENTRYPOINT ["java", "-jar", "app.jar"]
16 changes: 16 additions & 0 deletions framey-application/archive-service/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id 'org.springframework.boot'
id 'java-library'
}

dependencies {
api project(':framey-common')
api project(':framey-web')
implementation project(":framey-monitoring")

//postgreSQL
runtimeOnly 'org.postgresql:postgresql'

testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package framey.archive;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;

@ConfigurationPropertiesScan
@SpringBootApplication
public class ArchiveServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ArchiveServiceApplication.class, args);
}

}
Loading
Loading