Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ChooSeoyeon committed Aug 31, 2023
0 parents commit 2858460
Show file tree
Hide file tree
Showing 45 changed files with 1,393 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/♻️-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "♻️ refactor"
about: 리팩토링 이슈 템플릿
title: "♻️ "
labels: "♻️ refactor"
assignees: ''

---

## 📌 Description
-

## 📝 To-do
- [ ]
- [ ]
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/⚙️-chore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "⚙️ chore"
about: 빌드, 설정 관련 이슈 템플릿
title: "⚙️ "
labels: "⚙️ chore"
assignees: ''

---

## 📌 Description
-

## 📝 To-do
- [ ]
- [ ]
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/✅-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "✅ test"
about: 테스트 이슈 템플릿
title: ""
labels: "✅ test"
assignees: ''

---

## 📌 Description
-

## 📝 To-do
- [ ]
- [ ]
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/✨-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "✨ feature"
about: 기능 추가 이슈 템플릿
title: ""
labels: "✨ feature"
assignees: ''

---

## 📌 Description
-

## 📝 To-do
- [ ]
- [ ]
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/🐛-bug-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "\U0001F41B bug/error"
about: 버그, 오류 해결 이슈 템플릿
title: "\U0001F41B "
labels: "\U0001F41B bug/error"
assignees: ''

---

## 📌 Description
-

## 📝 To-do
- [ ]
- [ ]
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/📝-documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "\U0001F4DD documentation"
about: 문서, 주석 관련 이슈 템플릿
title: "\U0001F4DD "
labels: "\U0001F4DD documentation"
assignees: ''

---

## 📌 Description
-

## 📝 To-do
- [ ]
- [ ]
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 🌱 관련 이슈
- close #

## 📌 작업 내용
-
59 changes: 59 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CICD

on:
push:
branches: [ "develop" ]
# pull_request:
# branches: [ "develop" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
# 기본 체크아웃
- name: Checkout
uses: actions/checkout@v3
# Gradlew 실행 허용
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
# JDK 17 세팅
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# 환경 변수 설정
- name: Set environment values
run: |
cd ./src/main/resources
touch ./env.properties
echo "${{ secrets.ENV_DEV }}" > ./env.properties
shell: bash
# Gradle build (Test 제외)
- name: Build with Gradle
run: ./gradlew clean build --exclude-task test
# Docker build
- name: Docker build
run: |
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
docker build -t lastpang .
docker tag lastpang ${{ secrets.DOCKERHUB_USERNAME }}/lastpang:${GITHUB_SHA::7}
docker push ${{ secrets.DOCKERHUB_USERNAME }}/lastpang:${GITHUB_SHA::7}
# Deploy
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_DEV }}
username: ubuntu
key: ${{ secrets.PRIVATE_KEY_DEV }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
envs: GITHUB_SHA
script: |
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/lastpang:${GITHUB_SHA::7}
sudo docker tag ${{ secrets.DOCKERHUB_USERNAME }}/lastpang:${GITHUB_SHA::7} lastpang_spring
sudo docker-compose up -d
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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/

### Classpath ###
env.properties
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM openjdk:17-jdk-slim-buster
COPY build/libs/hour-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app.jar"]
37 changes: 37 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.3'
id 'io.spring.dependency-management' version '1.1.3'
}

group = 'app.lastpang'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '17'
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
compileOnly 'org.projectlombok:lombok'
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'
}

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.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 2858460

Please sign in to comment.