Skip to content

Commit

Permalink
init: 진행중 작업 임시 커밋
Browse files Browse the repository at this point in the history
  • Loading branch information
laigasus committed Mar 24, 2024
0 parents commit cee8356
Show file tree
Hide file tree
Showing 192 changed files with 8,027 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/report_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Report bug
about: 오류가 발생한 영역에 대해 보고합니다 [Dev]
title: "[BUG] "
labels: bug
assignees: ''

---

## 설명

짧고 명확하게 오류에 대해 설명합니다


## 오류 발생 재현

이렇게 했더니 다음과 같은 오류가 발생했습니다
주의. log는 절대!!! 복붙하지 않고 인용, gist등을 이용합니다

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error


## 기대 결과

이런 결과가 나왔으면 좋겠습니다


## 첨부 자료

해당 템플릿에 자료(사진, 동영상 등) 첨부합니다


## 추가 정보

추가로 하고 싶은 말이나 위에서 설명하지 못했던 것 등을 간략히 작성합니다
긴 논의는 GitHub Discussion에서 진행해주세요


## 나의 환경

외부적 환경으로 인해 문제가 발생한 것 같다면 기재해줍니다

**Desktop**

- OS: windows 11
- IDE: Intellij
- Browser: Chrome
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## 변경사항

변경사항에 대해 간략하게 설명해주세요.
SemVer 규칙을 따라야 합니다

### Issue Link - #1


## 체크리스트

리뷰 요청 전에 확인해야 할 사항들을 나열해주세요.

- [ ] 내 코드를 스스로 검토했나요?
- [ ] 핵심 기능에 대해 충분한 테스트를 수행했나요?
- [ ] 분석이 필요한가요?
- [ ] 이것이 제품 업데이트의 일부인가요? 그렇다면, 이 업데이트에 대해 한 문장으로 작성해주세요.


## 참고
2 changes: 2 additions & 0 deletions .github/workflows/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: laigasus
custom: https://toss.me/laigasus
29 changes: 29 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: github action tag release

on:
push:
branches:
- main

jobs:
setup-build-deploy:
name: Setup, Build, and Deploy
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
id-token: write

steps:
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
50 changes: 50 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI - test

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

permissions:
contents: read
checks: write
pull-requests: write

jobs:
build:
name: Build and test project
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
submodules: true

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

- name: Grant execute permission for gradlew
run: |
chmod +x ./gradlew
- name: Test with Gradle
run: |
./gradlew test
- name: Publish result of unit test
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: "**/build/test-results/test/TEST-*.xml"

- name: Publish failure of unit test
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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/
.env

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

### VS Code ###
.vscode/
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM gradle:8.2.1-jdk17-alpine AS builder
WORKDIR /build

# 그래들 파일이 변경되었을 때만 새롭게 의존패키지 다운로드 받게함.
COPY build.gradle settings.gradle /build/
RUN gradle build -x test --parallel --continue > /dev/null 2>&1 || true

ARG EnvironmentVariable
ARG RAILWAY_ENVIRONMENT
ENV RAILWAY_ENVIRONMENT=$RAILWAY_ENVIRONMENT

# 빌더 이미지에서 애플리케이션 빌드
COPY . /build
RUN gradle build -x test --parallel

# APP
FROM openjdk:21-slim
WORKDIR /app

# 빌더 이미지에서 jar 파일만 복사
COPY --from=builder /build/build/libs/blisgo.jar .

EXPOSE 8080

# root 권한으로 실행
USER root
ENTRYPOINT ["java","-jar","application.jar"]
9 changes: 9 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
bootJar.mainClass = 'blisgo.app.BlisgoApplication'
bootJar.enabled = true

dependencies {
implementation project(':usecase')
implementation project(':infrastructure:internal')
implementation project(':infrastructure:external')
implementation project(':domain')
}
23 changes: 23 additions & 0 deletions app/src/main/java/blisgo/app/BlisgoApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package blisgo.app;

import blisgo.domain.DomainRoot;
import blisgo.infrastructure.external.ExternalRoot;
import blisgo.infrastructure.internal.InternalRoot;
import blisgo.usecase.UseCaseRoot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.TimeZone;

@SpringBootApplication(scanBasePackageClasses = {
InternalRoot.class,
DomainRoot.class,
ExternalRoot.class,
UseCaseRoot.class
})
public class BlisgoApplication {
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
SpringApplication.run(BlisgoApplication.class, args);
}
}
48 changes: 48 additions & 0 deletions app/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
spring:
config:
activate:
on-profile: dev

devtools:
livereload:
enabled: true

datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: "jdbc:mysql://localhost:3306/blisgo"
username: root
password: root

jpa:
show-sql: true
hibernate:
ddl-auto: create
properties:
hibernate:
format_sql: true
highlight_sql: true
use_sql_comments: true
ejb:
naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy
defer-datasource-initialization: true

sql:
init:
mode: always

thymeleaf:
cache: false

data:
redis:
host: localhost
port: 6379

flyway:
enabled: false

server:
servlet:
session:
cookie:
domain: localhost
36 changes: 36 additions & 0 deletions app/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
spring:
data:
redis:
host: ${REDISHOST}
username: ${REDISUSER}
password: ${REDISPASSWORD}
port: ${REDISPORT}

datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: "jdbc:${MYSQL_URL}"
username: ${MYSQLUSER}
password: ${MYSQLPASSWORD}

thymeleaf:
cache: true

jpa:
show-sql: true
hibernate:
ddl-auto: validate

flyway:
enabled: true
baseline-on-migrate: on
locations: classpath:db/migration
url: "jdbc:${MYSQL_URL}"
user: ${MYSQLUSER}
password: ${MYSQLPASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver

server:
servlet:
session:
cookie:
domain: blisgo.up.railway.app
5 changes: 5 additions & 0 deletions app/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
spring:
profiles:
include:
common, thymeleaf, oauth, redis
active: ${APP_PROFILE}
8 changes: 8 additions & 0 deletions app/src/main/resources/banner.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
____ _ ___ ____ ____ ___
| __ )| | |_ _/ ___| / ___|/ _ \
| _ \| | | |\___ \| | _| | | |
| |_) | |___ | | ___) | |_| | |_| |
|____/|_____|___|____/ \____|\___/

Until the Earth becomes HEALTHY!!!
Powered by Spring Boot ${spring-boot.version}
Loading

0 comments on commit cee8356

Please sign in to comment.