Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
3b9194e
📝 Docs
seoiiwon Aug 10, 2025
73eab86
📝 Docs: "PR 템플릿 추가"
seoiiwon Aug 10, 2025
f665042
📝 Docs: ".gitignore 추가"
seoiiwon Aug 10, 2025
1175f24
⚙️ Setting: "Spring Boot 프로젝트 세팅"
seoiiwon Aug 10, 2025
d25898d
📝 Docs: ".gitignore 수정"
seoiiwon Aug 10, 2025
d3e3903
⚙️ Setting: "application.yml 작성"
seoiiwon Aug 10, 2025
62ad887
⚙️ Setting: "Gradle DI 추가"
seoiiwon Aug 10, 2025
fa09bf4
✅ Test: "Database 연결 테스트 코드 작성"
seoiiwon Aug 10, 2025
fa73530
⚙️ Setting: "Gradle DI 추가"
seoiiwon Aug 10, 2025
3fd022b
⚙️ Setting: "swagger, spring security 기본 설정"
seoiiwon Aug 10, 2025
edb9dee
⚙️ Setting: "CORS 설정"
seoiiwon Aug 10, 2025
53445f0
Merge pull request #2 from POPCONG/feature/setting-init-#1
seoiiwon Aug 10, 2025
5f02248
⚙️ Setting: "예외 포맷 작성"
seoiiwon Aug 10, 2025
3be405e
⚙️ Setting: "ErrorResponse 작성"
seoiiwon Aug 10, 2025
75bc71f
⚙️ Setting: "커스텀 예외처리, 핸들러 작성"
seoiiwon Aug 10, 2025
a6899de
⚙️ Setting: "응답 템플릿 작성"
seoiiwon Aug 10, 2025
87d0013
Merge pull request #4 from POPCONG/feature/setting-template-#3
seoiiwon Aug 12, 2025
2778dd5
⚙️ Setting: "DI 추가"
seoiiwon Aug 12, 2025
631c5a3
⚙️ Setting: "DI 수정"
seoiiwon Aug 12, 2025
4261b7d
✨ feature: "entity, model 작성"
seoiiwon Aug 13, 2025
8a3daeb
🔨 fix: "model class -> record 수정"
seoiiwon Aug 13, 2025
40a8fce
✨ feature: "인증 관련 model, interface 작성"
seoiiwon Aug 13, 2025
f139e63
⚙️ setting: "토큰 기본 설정"
seoiiwon Aug 13, 2025
a4ea8c0
✨ feature: "토큰 생성 비지니스 로직 작성"
seoiiwon Aug 13, 2025
4e62b04
✨ feature: "JWT 유틸리티 작성"
seoiiwon Aug 13, 2025
4a4dd7b
✨ feature: "JWT 검증, 인증상태 설정 비지니스 로직 설정"
seoiiwon Aug 13, 2025
51ed6a4
✨ feature: "Security 관련 에러 핸들러 작성"
seoiiwon Aug 13, 2025
9592eb1
⚙️ Setting: "SpringSecurity 재설정"
seoiiwon Aug 13, 2025
e5848c5
✨ Feature: "소셜 로그인 관련 model, interface 작성"
seoiiwon Aug 13, 2025
773bc9b
✨ Feature: "로그인 비지니스 로직 작성"
seoiiwon Aug 13, 2025
dafc914
✨ Feature: "로그인 관련 repository 작성"
seoiiwon Aug 13, 2025
45ed253
✨ Feature: "kakao 로그인 구현체 작성"
seoiiwon Aug 13, 2025
144fd02
🔨 fix: "OAuth2UserInfoFactory 코드 누락 수정"
seoiiwon Aug 13, 2025
8b3cd37
✨ Feature: "oauth2 관련 CustomUserDetails 작성"
seoiiwon Aug 13, 2025
46097ab
✨ Feature: "oauth2 성공 핸들러 작성"
seoiiwon Aug 13, 2025
9fb2e79
✨ Feature: "인증 관련 service, interface 수정"
seoiiwon Aug 13, 2025
a1db47d
⚙️ Setting: "OAuth2 관련 설정"
seoiiwon Aug 13, 2025
50b9a6b
✨ Feature: "enum 생성"
chanition Aug 13, 2025
b8600d7
✨ Feature: "엔티티 생성"
chanition Aug 13, 2025
d610a3d
✨ Feature: "User 엔티티 추가"
chanition Aug 13, 2025
5351534
✨ Feature: "model 생성"
chanition Aug 13, 2025
172e98e
✨ Feature: "location 추가"
chanition Aug 13, 2025
dd3197c
🔨 Fix: "중복 내용 제거 및 통합"
seoiiwon Aug 14, 2025
c71671e
🔨 Fix: "경로 수정"
seoiiwon Aug 14, 2025
3ca234c
🔨 Fix: "gradle springdoc di 버전 수정"
seoiiwon Aug 14, 2025
5259b6f
✨ Feature: "카카오 소셜 로그인 구현"
seoiiwon Aug 14, 2025
5de3a0a
✅ Test: "인증 테스트 코드 작성 및 테스트"
seoiiwon Aug 14, 2025
2dff036
🔨 Fix: "user id -> userId 수정"
seoiiwon Aug 14, 2025
af3b0d5
🔨 Fix: "UserRole general 추가"
seoiiwon Aug 14, 2025
36d3c73
Merge pull request #7 from POPCONG/feature/entity-#6
seoiiwon Aug 14, 2025
80a2c2d
Merge branch 'develop' into feature/auth-#5
seoiiwon Aug 14, 2025
1b47b03
Merge pull request #8 from POPCONG/feature/auth-#5
seoiiwon Aug 14, 2025
b38c376
✨ Feature: "loadUserById 추가"
seoiiwon Aug 14, 2025
b423f1c
⚙️ Setting: "ddl-auto update로 고정"
seoiiwon Aug 14, 2025
7ee3847
✨ Feature: "jwt 유저 조회 로직 작성"
seoiiwon Aug 14, 2025
8d6a1e0
⚙️ Setting: "db에 저장되지 않는 문제 해결"
seoiiwon Aug 14, 2025
52b99cd
Merge pull request #11 from POPCONG/feature/jwt-decode-#10
seoiiwon Aug 14, 2025
286eb0f
✨ Feature: "dto 작성"
seoiiwon Aug 14, 2025
0e3b892
✨ Feature: "error code 수정"
seoiiwon Aug 14, 2025
216b0ba
✨ Feature: "정렬 타입 Enum으로 생성"
seoiiwon Aug 14, 2025
634a9e5
🔨 Fix: "dto 위치 수정"
seoiiwon Aug 14, 2025
1251cb6
✨ Fix : "오타 수정"
chanition Aug 14, 2025
32bd9d8
✨ Feature : "MyPopups 조회 로직 추가"
chanition Aug 14, 2025
89db3e3
✨ Feature : "MyPopups 응답 DTO , mapper 추가"
chanition Aug 14, 2025
e19cde8
✨ Feature : "홈 정보 조회 API에 MyPopups 포함"
chanition Aug 14, 2025
c37ddd6
🔨 Feature : "페이징 제거"
chanition Aug 15, 2025
c04acce
🔨 Feature : "팝업리스트 오름차순 정렬"
chanition Aug 15, 2025
35c52dd
Merge pull request #13 from POPCONG/feature/home-user-#9
chanition Aug 15, 2025
6394e1b
⚙️ Setting: "QueryDSL DI 주입"
seoiiwon Aug 15, 2025
b7a4150
🔨 Fix: "데이터 수정"
seoiiwon Aug 15, 2025
8a9fe31
✨ Feature: "인터페이스 작성"
seoiiwon Aug 15, 2025
f1326b5
✨ Feature: "Mapper 작성"
seoiiwon Aug 15, 2025
cc13750
✨ Feature: "내부 비지니스 로직 작성"
seoiiwon Aug 15, 2025
39150b0
✨ Feature: "Controller 작성"
seoiiwon Aug 15, 2025
2c03b19
✨ Feature: "CoverImage 조회 추가"
seoiiwon Aug 15, 2025
72403b8
🔨 Fix: "이미지 조회 관련 수정"
seoiiwon Aug 15, 2025
99bedbb
✨ Feature: "거리 측정 및 후기 수 로직 추가"
seoiiwon Aug 15, 2025
f8fe6c9
✨ Feature: "정렬 방식 추가"
seoiiwon Aug 15, 2025
5ce4a09
Merge pull request #15 from POPCONG/feature/marker-list-#12
chanition Aug 16, 2025
8141822
⚙️ Setting: "GCP 설정"
seoiiwon Aug 16, 2025
e071521
⚙️ Setting: "GCP 설정"
seoiiwon Aug 16, 2025
2ea1ff9
✨ Feature: "Google Drive 업로드 로직 작성"
seoiiwon Aug 16, 2025
41bfdb8
✨ Feature: "Google Drive 업로드 API 작성"
seoiiwon Aug 16, 2025
b43f4b5
Merge branch 'develop' into feature/apply-host-#16
seoiiwon Aug 16, 2025
c7bc4b5
Merge pull request #18 from POPCONG/feature/apply-host-#16
seoiiwon Aug 16, 2025
f9c69a8
⚙️ Setting : "S3 연동 세팅"
chanition Aug 16, 2025
c4ee50f
✨️ Feature : "AWS S3 이미지 업로드 기능 추가"
chanition Aug 16, 2025
0e0f9d8
Merge branch 'develop' into feature/update-profile-#17
seoiiwon Aug 16, 2025
ebd3cc9
Merge pull request #20 from POPCONG/feature/update-profile-#17
chanition Aug 17, 2025
038b7f6
🔨 Fix: "카카오 인증 관련 오류사항 수정"
seoiiwon Aug 17, 2025
e0616b9
⚙️ Setting: "docker 세팅 및 배포"
seoiiwon Aug 17, 2025
4692528
⚙️ Setting: "Github Actions 설정"
seoiiwon Aug 17, 2025
c327942
Merge branch 'develop' into feature/deploy-#19
seoiiwon Aug 17, 2025
394a753
Merge pull request #22 from POPCONG/feature/deploy-#19
seoiiwon Aug 17, 2025
d414237
🔨 Fix: "application.yml 누락"
seoiiwon Aug 17, 2025
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
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
.gitignore
.gradle
build
out
**/node_modules
**/.idea
**/*.iml
**/.DS_Store
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: BUG ISSUE
about: 버그 관련 이슈
title: "[BUG] "
labels: "\U0001F41E Bug"
assignees: ''

---

## 🐛 Description
> 버그에 대해 간단하게 설명해주세요.



## ✏️ Bug Occur
> Given-When-Then 형식으로 서술해주세요.



## 👀 Expected Result
> 예상했던 정상 결과에 대해 설명해주세요.



## 📢 Notes
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: FEATURE ISSUE
about: 기능 관련 이슈
title: "[FEATURE]"
labels: "✨ Feature"
assignees: ''

---

## 🚀 Description
> 작업 내용에 대해 간단하게 설명해주세요.



## ✅ TODO
- [ ] todo
- [ ] todo


## 📢 Notes
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 📌 Related Issue
> #이슈번호


## 🚀 Description
> 작업 내용에 대해 간단하게 설명해주세요.


## 📸 Screenshot


## 📢 Notes
> 리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.
87 changes: 87 additions & 0 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Release Deploy

on:
push:
branches: ["release"]
workflow_dispatch: {}

env:
AWS_REGION: us-west-2
ACCOUNT_ID: 590184104064
ECR_REPOSITORY: popcong-server
REGISTRY: ${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com
IMAGE_TAG: ${{ github.sha }}

concurrency:
group: release-deploy
cancel-in-progress: true

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

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

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build & Push (linux/amd64)
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
context: .
file: ./Dockerfile
tags: |
${{ env.REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
${{ env.REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest

deploy:
needs: build-and-push
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Connect & Deploy on EC2
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
set -euo pipefail

AWS_REGION="${{ env.AWS_REGION }}"
ACCOUNT_ID="${{ env.ACCOUNT_ID }}"
REGISTRY="${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com"

echo "[EC2] ECR 로그인"
aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS --password-stdin "$REGISTRY"

echo "[EC2] 디렉토리 이동"
cd ~/popcong

echo "[EC2] 최신 이미지 Pull"
docker compose pull

echo "[EC2] 재기동"
docker compose up -d --remove-orphans

echo "[EC2] 상태 확인"
docker compose ps
docker ps
53 changes: 53 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
src/main/generated/
build/generated/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### apple ###
.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store

### yml ###
src/main/resources/application-local.yml
src/main/resources/application-prod.yml
src/main/resources/application-secret.yml

### GCP ###
src/main/resources/popcong-c9addd5f509d.json
57 changes: 57 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# amazoncorretto:21-alpine 이미지를 베이스로 사용 / 컨테이너 내부 작업 디렉토리는 app으로 함
FROM amazoncorretto:21-alpine AS builder
WORKDIR /app

# Gradle 캐시 최적화를 위한 복사
COPY gradlew gradle.properties* settings.gradle* build.gradle* /app/
COPY gradle /app/gradle

# Gradle Wrapper 실행 권한 부여 및 버전 확인
RUN chmod +x gradlew && ./gradlew --version

# 실제 소스코드 복사
COPY . /app

# 이미지 빌드
RUN ./gradlew clean bootJar -x test

# Spring Boot layertools로 레이어 추출
RUN java -Djarmode=layertools -jar $(find build/libs -name "*.jar" | head -n 1) extract --destination /app/layers

# Runtime
# 런타임에서도 같은 openjdk 이미지 사용
FROM amazoncorretto:21-alpine

# 일반 사용자로 실행
RUN addgroup -S popcong && adduser -S popcong -G popcong -u 1001

# 런타임 작업 디렉토리 지정
WORKDIR /app

# Spring Boot layertools 사용한 경우 설정하는 부분
# 의존성 레이어
COPY --from=builder /app/layers/dependencies/ ./
# Spring Boot 런처 레이어
COPY --from=builder /app/layers/spring-boot-loader/ ./
# 스냅샷 의존성 레이어
COPY --from=builder /app/layers/snapshot-dependencies/ ./
# 애플리케이션 코드 레이어: 가장 자주 바뀌는 부분
COPY --from=builder /app/layers/application/ ./

# 한국 환경 기본 환경변수 설정
ENV TZ=Asia/Seoul \
LANG=ko_KR.UTF-8 \
LANGUAGE=ko_KR:ko:en \
LC_ALL=ko_KR.UTF-8 \
SPRING_PROFILES_ACTIVE=prod \
SERVER_PORT=8080 \
JAVA_OPTS="-XX:MaxRAMPercentage=75 -XX:InitialRAMPercentage=50 -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Seoul"

# 컨테이너에서 노출할 포트
EXPOSE 8080

# root가 아닌 spring 사용자로 실행
USER popcong

# JarLauncher로 레이어 디렉토리 구조에 맞춰 앱 부팅 (Spring Boot layertools 사용한 경우)
ENTRYPOINT ["sh","-c","java $JAVA_OPTS -cp /app org.springframework.boot.loader.launch.JarLauncher"]
109 changes: 109 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.4'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'popcong'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
// Dev
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'

// Web
implementation 'org.springframework.boot:spring-boot-starter-web'

// Security
implementation 'org.springframework.boot:spring-boot-starter-security'
testImplementation 'org.springframework.security:spring-security-test'

// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// OAuth2
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'

// Database
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'com.mysql:mysql-connector-j'

// QueryDSL
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta'
annotationProcessor 'jakarta.annotation:jakarta.annotation-api:2.1.1'
annotationProcessor 'jakarta.persistence:jakarta.persistence-api:3.1.0'

// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// HealthCheck
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// Springdoc
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0'

// ModelMapper
implementation 'org.modelmapper:modelmapper:2.4.2'

// Validation
implementation 'jakarta.validation:jakarta.validation-api:3.1.0'

//AWS
implementation platform('com.amazonaws:aws-java-sdk-bom:1.12.700')
implementation 'com.amazonaws:aws-java-sdk-s3' // S3
implementation 'com.amazonaws:aws-java-sdk-sts'

// GCP (Google Drive)
implementation 'com.google.guava:guava:32.1.0-jre'
implementation 'com.google.http-client:google-http-client:1.41.8'
implementation 'com.google.http-client:google-http-client-jackson2:1.41.8'
implementation 'com.google.api-client:google-api-client:2.7.2' // Google API Client
implementation 'com.google.apis:google-api-services-drive:v3-rev20250511-2.0.0' // Google Drive
implementation 'com.google.auth:google-auth-library-oauth2-http:1.20.0' // Google Auth
}

// Q타입 엔티티가 생성될 경로
def generated = 'src/main/generated'


// compile시 Q타입 경로에 파일 생성
tasks.withType(JavaCompile).configureEach {
options.generatedSourceOutputDirectory.set(file(generated))
}

sourceSets {
main.java.srcDirs += [ generated ]
}

// clean 시 Q타입 삭제
clean {
delete file(generated)
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
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.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading