Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0d8a68a
init: initial settings
yooniicode Nov 28, 2025
454150b
chore: adding issue template
yooniicode Nov 28, 2025
61f6232
init: terraform initial settings
yooniicode Dec 16, 2025
c97d734
init: terraform initial settings
yooniicode Dec 16, 2025
1462f02
chore: Remove tfvars from tracking
yooniicode Dec 16, 2025
75b5292
docs: tfvars 예시 파일
yooniicode Dec 16, 2025
e24dbf3
feat: 배포 관련 코드 작성
yooniicode Dec 16, 2025
37af03a
feat: 엔티티 구현, gitignore 수정
yooniicode Dec 16, 2025
c3e1deb
feat: yml db 연동되도록 수정
yooniicode Dec 16, 2025
435aec6
feat: 엔티티 수정 및 candidate 추가
yooniicode Dec 16, 2025
f0d314f
feat: 인덱스 및 name 예약어 관련 이름 변경
yooniicode Dec 16, 2025
10fd76c
Merge pull request #4 from DiggIndie/feat/#2-entity
yooniicode Dec 16, 2025
5b61399
chore: merge dev
yooniicode Dec 16, 2025
fcbe2b9
ci: deploy.yml 버전 수정 및 수동 배포 추가
yooniicode Dec 16, 2025
d42718b
Merge pull request #5 from DiggIndie/feat/#1-terraform-init
yooniicode Dec 16, 2025
769a7ce
[DEPLOY] dev → master 배포 (#6)
yooniicode Dec 16, 2025
b32f58e
chore: workflow 파일 위치 변경
yooniicode Dec 16, 2025
875225d
chore: workflow 파일 위치 변경
yooniicode Dec 16, 2025
ebff074
fix: terraform 8080 인바운드 적용
yooniicode Dec 16, 2025
f3da455
fix: terraform 8080 인바운드 적용
yooniicode Dec 16, 2025
4fb67de
refactor: ecs 없이 ec2로만 배포하도록 리팩토링
yooniicode Dec 16, 2025
8140337
chore: merge conflicts
yooniicode Dec 16, 2025
be3a05b
refactor: ecs 대신 ec2 구조로 변경
yooniicode Dec 16, 2025
4f8d42a
Merge branch 'dev'
yooniicode Dec 16, 2025
72bbb96
chore: merge conflict
yooniicode Dec 16, 2025
6f6336a
feat : 의존성 구성
Hoyoung027 Dec 16, 2025
47b8d51
feat : 기본 응답 구조 구현
Hoyoung027 Dec 16, 2025
f3ad253
feat : security 설정
Hoyoung027 Dec 16, 2025
4181fda
feat: PostgreSQL로 변경
yooniicode Dec 16, 2025
86847c6
[FEAT] 기본 세팅 (#8)
Hoyoung027 Dec 16, 2025
367927e
feat : 로그인 관련 API 구현
Hoyoung027 Dec 16, 2025
8089757
merge : dev와 병합
Hoyoung027 Dec 16, 2025
ca27b30
feat : 팀 목록 반환 API 개발
Hoyoung027 Dec 16, 2025
b06eb9d
feat : 팀 토표 결과 반환 API 개발
Hoyoung027 Dec 16, 2025
adfaf59
feat : 파트장 관련 API 개발
Hoyoung027 Dec 17, 2025
6d98f7a
fix : 코드 리뷰 반영
Hoyoung027 Dec 17, 2025
ad0831c
Merge pull request #9 from DiggIndie/feat/#3-auth
Hoyoung027 Dec 17, 2025
88e5f03
merge branch 'dev' into feat/#10-team
Hoyoung027 Dec 17, 2025
28f8c43
Merge pull request #12 from DiggIndie/feat/#10-team
Hoyoung027 Dec 17, 2025
414f091
Merge branch 'dev' into feat/#11-leader
Hoyoung027 Dec 17, 2025
261b194
fix : 코드 리뷰 반영
Hoyoung027 Dec 17, 2025
084f9bb
Merge pull request #13 from DiggIndie/feat/#11-leader
Hoyoung027 Dec 17, 2025
7555d7f
[FEAT] swagger 세팅 및 동시성 제어 투표 API 개발, closes #14, 16, 18 (#19)
yooniicode Dec 17, 2025
51888d0
feat: docker-compose 추가 및 배포시 redis 설정 추가
yooniicode Dec 17, 2025
244867d
fix: 로컬 개발용 docker-compose 수정
yooniicode Dec 17, 2025
db916a4
chore: 로컬용 도커 컴포즈 env 파일 사용하도록 수정
yooniicode Dec 17, 2025
f13cf49
Merge pull request #22 from DiggIndie/feat/#21-deploy
Hoyoung027 Dec 18, 2025
9ba5f43
[DEPLOY] 배포 확인 (#23)
yooniicode Dec 18, 2025
a57fe41
feat : refresh token 로직 작성
Hoyoung027 Dec 18, 2025
711fd02
fix: rds 퍼블릭 서브넷으로 변경
yooniicode Dec 18, 2025
1542b0b
[DEPLOY] RDS 퍼블릭으로 변경 후 배포 (#25)
yooniicode Dec 18, 2025
d946f2e
fix: 5432 포트 추가
yooniicode Dec 18, 2025
9729b89
docs: swagger에 배포 서버 추가
yooniicode Dec 18, 2025
e72a199
Merge branch 'master' of https://github.com/DiggIndie/spring-vote-22nd
yooniicode Dec 18, 2025
d6d0945
fix : 코드 리뷰 반영
Hoyoung027 Dec 18, 2025
43a20c4
Merge pull request #24 from DiggIndie/feat/#20-login-refresh
Hoyoung027 Dec 18, 2025
d43a3b2
feat: cors 설정 및 swagger prod 환경 추가
yooniicode Dec 18, 2025
a69b26d
Merge pull request #27 from DiggIndie/feat/#26-cors
Hoyoung027 Dec 18, 2025
98ae15a
chore: merge confilcts with master
yooniicode Dec 18, 2025
4d4650c
[DEPLOY] cors 관련 설정 및 swagger (#28)
yooniicode Dec 18, 2025
e8ad386
feat : swagger 세팅
Hoyoung027 Dec 18, 2025
0943d24
docs: vercel 관련 주소 추가
yooniicode Dec 18, 2025
2d3df6c
Merge branch 'master' into dev
yooniicode Dec 18, 2025
c370ee0
[DEPLOY] 배포 (#29)
yooniicode Dec 18, 2025
23e7ab2
feat: 팀 투표 결과 조회 기능
yooniicode Dec 19, 2025
754ce24
chore: merge master
yooniicode Dec 19, 2025
1c4723e
[DEPLOY] 배포 (#30)
yooniicode Dec 19, 2025
b66622c
Change ddl-auto setting from validate to update
yooniicode Dec 19, 2025
bdc8aa7
fix : cors 설정 변경
Hoyoung027 Dec 20, 2025
1e00179
Merge pull request #31 from DiggIndie/dev
Hoyoung027 Dec 20, 2025
583a4c2
docs: Update README with mid-term presentation link
yooniicode Dec 22, 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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: ✨ Feature Request
about: 새로운 기능을 제안하세요.
title: "[FEAT] <기능 요약>"
labels: enhancement
assignees: ''
---

<!-- 이슈이름은 '[컨벤션] 기능이름' 으로 통일해주세요.
ex. [FEAT] searchPublicCourse -->

<!-- 라벨 라벨로 담당자를 표시
ex. Hoyoung027 -->

<!-- assignees은 자기 자신에 해당하는지 팀에 해당하는지에 따라 작성 -->

## 🚀 기능 설명
<!-- 어떤 기능이 필요한지 설명해주세요. -->


## 🏆 작업 목록
<!-- 이 기능이 추가되면 어떤 이점이 있나요? -->
-

## 🔗 참고 자료
<!-- 참고한 자료가 있나요? -->
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: ✨ Trouble Shooting
about: 문제를 해결했던 기록을 남겨봐요.
title: "[Trouble Shooting] <오류 요약>"
labels: bug
assignees: ''
---

<!-- 이슈이름은 '[컨벤션] 기능이름' 으로 통일해주세요.
ex. [FEAT] searchPublicCourse -->

<!-- 라벨 라벨로 담당자를 표시
ex. Hoyoung027 -->

<!-- assignees은 자기 자신에 해당하는지 팀에 해당하는지에 따라 작성 -->

## 📌 이슈 설명
<!-- 자세한 기능 또는 버그를 설명해 주세요.
ex. 검색기능 : 장소, 제목을 키워드로 최신순으로 정렬해 퍼블릭 코스를 검색하는 기능, ???버그 : !!!, ~~~ , !!! 상황에서 ~~~한 버그가 난다. -->


## 🚀 Description
- [ ] <!-- 해당 체크박스 안에 순서대로 어떻게 해결할지 써주세요. 그리고 해당 내용을 해결했으면 체크 표시해주세요. -->
- [ ] <!-- ex. 검색 키워드를 쿼리로 받기 -->
- [ ] <!-- public course 테이블에 findMany와 contains 를 사용해 검색기능 구현-->

## ⏰ 문제 해결을 위해 시도한 점


## ❄️ 주의할 점
<!-- 기능을 구현 또는 버그를 고칠 때 주의해야할 점을 써주세요 ex. 검색시 여러 칼럼을 동시에 봐야한다 -->


## 🔗 참고 자료
<!-- 참고한 자료가 있나요? -->


## ✅ TODO
- [ ] label 확인
- [ ] assigness 확인
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- PR 이름은 '[컨벤션] 기능이름' 으로 통일해주세요.
ex. [FEAT] searchPublicCourse -->

<!-- 라벨 라벨로 담당자를 표시
ex. Hoyoung027 -->

## 🛰️ Issue Number
<!-- 해당 PR과 연결된 이슈를 닫아주세요. close #issue_number -->
close #


## 🪐 작업 내용
<!-- 해당 PR에서 작업한 내용을 적어주세요. -->



## ⚠️ PR 특이 사항




## 📚 Reference




### ✅ Check List
- [ ] 코드가 정상적으로 컴파일되나요?
- [ ] 포스트맨에서 결과값을 제대로 확인했나요?
- [ ] 리뷰어 설정을 지정했나요?
- [ ] merge할 브랜치의 위치를 확인했나요?
- [ ] Label을 지정했나요?
92 changes: 92 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Deploy to AWS

on:
push:
branches: [master]
workflow_dispatch:

env:
AWS_REGION: ap-northeast-2
ECR_REPOSITORY: spring-vote-dev
EC2_HOST: ${{ secrets.EC2_HOST }}

jobs:
deploy:
runs-on: ubuntu-latest

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
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Build with Gradle
run: chmod +x ./gradlew && ./gradlew build -x test

- name: Build and push Docker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest

- name: Deploy to EC2
uses: appleboy/[email protected]
with:
host: ${{ secrets.EC2_HOST }}
username: ec2-user
key: ${{ secrets.EC2_SSH_KEY }}
script: |
mkdir -p /home/ec2-user/app
cd /home/ec2-user/app

cat > docker-compose.yml << 'EOF'
version: '3.8'
services:
app:
image: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.ap-northeast-2.amazonaws.com/spring-vote-dev:latest
ports:
- "8080:8080"
environment:
- DB_HOST=${{ secrets.DB_HOST }}
- DB_PORT=5432
- DB_NAME=${{ secrets.DB_NAME }}
- DB_USERNAME=${{ secrets.DB_USERNAME }}
- DB_PASSWORD=${{ secrets.DB_PASSWORD }}
- REDIS_HOST=redis
- REDIS_PORT=6379
- JWT_SECRET_KEY=${{ secrets.JWT_SECRET_KEY }}
depends_on:
- redis
restart: unless-stopped

redis:
image: redis:alpine
ports:
- "6379:6379"
restart: unless-stopped
EOF

aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.ap-northeast-2.amazonaws.com

docker-compose down || true
docker-compose pull
docker-compose up -d
59 changes: 59 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
HELP.md
.env
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### 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/

# Terraform
.terraform/
.terraform.lock.hcl
*.tfstate
*.tfstate.*
crash.log
crash.*.log
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# 민감 정보
*.tfvars
*.tfvars.json
*.auto.tfvars
*.auto.tfvars.json

# 로컬 백엔드
terraform.tfstate.d/
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM eclipse-temurin:21-jdk-alpine AS build
WORKDIR /app
COPY . .
RUN chmod +x ./gradlew && ./gradlew build -x test

FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
COPY --from=build /app/build/libs/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# spring-vote-22nd
ceos back-end 22nd voting service project

[🚀 중간과제 발표 자료](https://www.figma.com/proto/3dN8Wnp3DyfXGTRm0ULMRF/CEOS-%EB%94%94%EA%B8%B4%EB%94%94?page-id=1813%3A15434&node-id=1962-2108&viewport=805%2C211%2C0.11&t=6ZI3P9hnxkRAE4bh-1&scaling=contain&content-scaling=fixed&starting-point-node-id=1962%3A2108)
64 changes: 64 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
plugins {
id 'java'
id 'org.springframework.boot' version '4.0.0'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.diggindie'
version = '0.0.1-SNAPSHOT'
description = 'voting service for ceos 22nd'

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

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {

// Spring Boot Starter
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'

// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'

// Database
runtimeOnly 'org.postgresql:postgresql'

// Lombok
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.postgresql:postgresql'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'

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

// jwt
implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.5'

// reddison
implementation 'org.redisson:redisson:3.27.0'

// swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.0'
}

tasks.named('test') {
useJUnitPlatform()
}
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3.8'
services:
app:
build: .
ports:
- "8080:8080"
environment:
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- REDIS_HOST=redis
- REDIS_PORT=6379
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
depends_on:
- redis

redis:
image: redis:alpine
ports:
- "6379:6379"
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-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading