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

v0.0.0 #6

Merged
merged 10 commits into from
Jul 12, 2024
Merged
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
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
> νƒ€μž…(지라 μ΄μŠˆν‚€): μ„€λͺ…

## πŸ“Œ μ—°κ΄€λœ 이슈
> 지라 이슈 링크

## πŸ“ μž‘μ—… λ‚΄μš©
> 이번 PRμ—μ„œ μž‘μ—…ν•œ λ‚΄μš©μ„ κ°„λž΅νžˆ μ„€λͺ…ν•΄μ£Όμ„Έμš”(이미지 첨뢀 κ°€λŠ₯)

## 🌳 μž‘μ—… 브랜치λͺ…
> ν˜„μž¬ μž‘μ—…μ€‘μΈ 브랜치λ₯Ό μ μ–΄μ£Όμ„Έμš”

## πŸ“Έ μŠ€ν¬λ¦°μƒ· (선택)

## πŸ’¬ 리뷰 μš”κ΅¬μ‚¬ν•­ (선택)
> 리뷰어가 νŠΉλ³„νžˆ λ΄μ£Όμ—ˆμœΌλ©΄ ν•˜λŠ” 뢀뢄이 μžˆλ‹€λ©΄ μž‘μ„±ν•΄μ£Όμ„Έμš”
53 changes: 53 additions & 0 deletions .github/workflows/makefile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Makefile CI

on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
workflow_dispatch:

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

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

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.8

build:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

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

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.8

- name: Run build
run: make build

- name: Run test code
run: make test

- name: Run docker
run: make up
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.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/
64 changes: 64 additions & 0 deletions .gitmessage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 컀밋 λ©”μ‹œμ§€ ν…œν”Œλ¦Ώ
# - ν˜•μ‹: <jira issue key>/<type>: <short summary>
# β–Ό <header> μž‘μ„±

# β–Ό <빈 쀄>

# β–Ό <body> μž‘μ„±

# β–Ό <빈 쀄>

# β–Ό <footer> μž‘μ„±

# μž‘μ„± ν˜•μ‹ μ„€λͺ…
# - 일반 컀밋
# <header>
# <jira issue key>
# - jira issue key μ•Œμ•„μ„œ λ„£μœΌμ„Έμš©
# <type>
# - feat: μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€
# - fix: 버그 μˆ˜μ •
# - docs: λ¬Έμ„œ μˆ˜μ •
# - style: μ½”λ“œ ν¬λ§·νŒ…, μ„Έλ―Έμ½œλ‘  λˆ„λ½, μ½”λ“œ 변경이 μ—†λŠ” 경우
# - design: μ‚¬μš©μž UI λ³€κ²½ (CSS λ³€κ²½ λ“±)
# - refactor: μ½”λ“œ λ¦¬νŒ©ν† λ§
# - test: ν…ŒμŠ€νŠΈ μ½”λ“œ, λ¦¬νŒ©ν† λ§ ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€
# - chore: λΉŒλ“œ 업무 μˆ˜μ •, νŒ¨ν‚€μ§€ λ§€λ‹ˆμ € μˆ˜μ •, production code와 λ¬΄κ΄€ν•œ λΆ€λΆ„λ“€ (.gitignore, build.gradle 같은)
# - comment: 주석 μΆ”κ°€ 및 λ³€κ²½
# - rename: 파일, 폴더λͺ… μˆ˜μ •
# - remove: 파일, 폴더 μ‚­μ œ
# <short summary>
# - ν•„μˆ˜ μž…λ ₯
# - λ³€κ²½ 사항을 κ°„κ²°ν•˜κ²Œ μ„€λͺ…
# - μ²«κΈ€μž μ†Œλ¬Έμž, ν˜„μž¬ μ‹œμ œ, λͺ…λ Ήλ¬ΈμœΌλ‘œ λ§ˆμ§€λ§‰μ— .(λ§ˆμΉ¨ν‘œ) 없이 μž‘μ„±
#
# <body>
# - μ΅œμ†Œ 20자 ν•„μˆ˜ μž…λ ₯(<type>docs μ œμ™Έ)
# - ν˜„μž¬ μ‹œμ œ, λͺ…λ Ήλ¬ΈμœΌλ‘œ μž‘μ„±
# - λ³€κ²½ μ‚¬ν•­μ˜ 동기(μ™œ)λ₯Ό μ„€λͺ…
# - λ³€κ²½ 효과λ₯Ό μ„€λͺ…ν•˜κΈ° μœ„ν•΄ 이전 λ™μž‘κ³Ό ν˜„μž¬ λ™μž‘μ˜ 비ꡐλ₯Ό 포함할 수 있음
#
# <footer>
# - Breaking Changes, deprecations λ˜λŠ” 이 컀밋이 closeν•˜κ±°λ‚˜ μ—°κ΄€λœ κΉƒν—™ 이슈, 지라 ν‹°μΌ“, ν’€λ¦¬ν€˜μŠ€νŠΈ 포함
# - μ˜ˆμ‹œ
# - 1. Breaking Changes
# BREAKING CHANGE: <breaking change μš”μ•½>
# <빈 쀄>
# <breaking change μ„€λͺ… + migration μ§€μ‹œ>
# <빈 쀄>
# <빈 쀄>
# Fixes #<issue number>
# - 2. deprecations
# DEPRECATED: <deprecated 된 것>
# <빈 쀄>
# <deprecation μ„€λͺ… + μΆ”μ²œ update 경둜>
# <빈 쀄>
# <빈 쀄>
# Closes #<pr 번호>
#
# - Revert 컀밋
# <header>
# revert: <revert λŒ€μƒ μ»€λ°‹μ˜ 헀더>
# <body>
# - This reverts commit <revert λŒ€μƒ μ»€λ°‹μ˜ SHA>
# - revert μ΄μœ μ— λŒ€ν•œ λͺ…ν™•ν•œ μ„€λͺ…
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM openjdk:17-jdk

# JAR_FILE λ³€μˆ˜ μ •μ˜ -> 기본적으둜 jar file이 2개이기 λ•Œλ¬Έμ— 이름을 νŠΉμ •ν•΄μ•Όν•¨
ARG JAR_FILE=./build/libs/klkl-0.0.1-SNAPSHOT.jar

# JAR 파일 메인 디렉토리에 볡사
COPY ${JAR_FILE} app.jar

# μ‹œμŠ€ν…œ μ§„μž…μ  μ •μ˜
ENTRYPOINT ["java", "-jar", "/app.jar"]
38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
DOCKER_ID := $(shell docker ps -aq)
DOCKER_IMAGE := $(shell docker images -q)
DOCKER_VOLUME := $(shell docker volume ls -q)

up:
@make build
docker compose up --build -d

down:
docker compose down

compile:
@./gradlew classes

build:
@make clean
@./gradlew build

test:
@./gradlew test

log:
docker compose logs

clean:
@./gradlew clean

fclean:
@make clean
$(if $(DOCKER_ID), docker rm -f $(DOCKER_ID))
$(if $(DOCKER_VOLUME), docker volume rm $(DOCKER_VOLUME))
$(if $(DOCKER_IMAGE), docker rmi $(DOCKER_IMAGE))

re:
@make fclean
@make up

.PHONY: up down compile build test log clean fclean re
42 changes: 42 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.1'
id 'io.spring.dependency-management' version '1.1.5'
}

group = 'taco'
version = '0.0.1-SNAPSHOT'

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

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
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'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
useJUnitPlatform()
}
6 changes: 6 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "3"
services:
spring:
build: .
ports:
- 8080:8080
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.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading