Skip to content

Commit

Permalink
Init : v1 프로젝트 복제
Browse files Browse the repository at this point in the history
  • Loading branch information
Astin01 committed Dec 21, 2024
0 parents commit bdebc7a
Show file tree
Hide file tree
Showing 280 changed files with 13,360 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug
about: 어떤 버그인지 설명해주세요
title: 'Bug:'
labels: bug
assignees: ''

---

## 어떤 버그인가요?

어떤 버그인지 간결하게 설명해주세요

## 어떤 상황에서 발생한 버그인가요?
(가능하면) Given-When-Then 형식으로 서술해주세요

## 예상 결과

예상했던 정상적인 결과가 어떤 것이었는지 설명해주세요

## 참고할만한 자료(선택)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature
about: feature 작업 상황에 대해 설명해주세요
title: 'Feature:'
labels: feature
assignees: ''

---

## 어떤 기능인가요?

추가하려는 기능에 대해 간결하게 설명해주세요

## Todo

- [ ] todo
- [ ] todo

## 참고할만한 자료(선택)
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 @@
- 제목 : Feat(issue 번호): 기능명
ex) Feat(17): pull request template 작성
(확인 후 지워주세요)

## 📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

### 작업에 대한 스크린샷 (선택)

## 💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

## #️⃣연관된 이슈

ex) #이슈번호, #이슈번호
85 changes: 85 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: deploy

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Github Repository 에 올린 파일들을 볼러오기
uses: actions/checkout@v4

- name: JDK 17 버전 설치
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: application.yml 파일 만들기
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application.yml
echo "${{ secrets.APPLICATION_COMMON }}" > ./src/main/resources/application-common.yml
echo "${{ secrets.APPLICATION_DEV }}" > ./src/main/resources/application-dev.yml
echo "${{ secrets.APPLICATION_PROD }}" > ./src/main/resources/application-prod.yml
echo "${{ secrets.APPLICATION_LOCAL }}" > ./src/main/resources/application-local.yml
- name: gradlew 실행 권한 부여
run: chmod +x ./gradlew

- name: 빌드하기 (main 브랜치)
if: github.ref == 'refs/heads/main'
run: ./gradlew clean build -x test -PspringProfile=prod --warning-mode all --scan

- name: 빌드하기 (develop 브랜치)
if: github.ref == 'refs/heads/develop'
run: |
./gradlew clean build -x test -PspringProfile=dev --warning-mode all --scan
- name: 빌드된 파일 이름 변경
run: mv ./build/libs/*SNAPSHOT.jar ./project.jar

- name: SCP로 EC2에 빌드된 파일 전송
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
source: project.jar
target: /home/ubuntu/solitour-server/tobe

- name: SSH로 EC2 접속
if: github.ref == 'refs/heads/main'
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
script_stop: true
script: |
rm -rf /home/ubuntu/solitour-server/current
mkdir /home/ubuntu/solitour-server/current
mv /home/ubuntu/solitour-server/tobe/project.jar /home/ubuntu/solitour-server/current/project.jar
cd /home/ubuntu/solitour-server/current
sudo fuser -k -n tcp 8080 || true
nohup java -jar -Dspring.profiles.active=prod project.jar > ./output.log 2>&1 &
rm -rf /home/ubuntu/solitour-server/tobe
- name: SSH로 EC2 접속
if: github.ref == 'refs/heads/develop'
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
script_stop: true
script: |
rm -rf /home/ubuntu/solitour-server/current
mkdir /home/ubuntu/solitour-server/current
mv /home/ubuntu/solitour-server/tobe/project.jar /home/ubuntu/solitour-server/current/project.jar
cd /home/ubuntu/solitour-server/current
sudo fuser -k -n tcp 8081 || true
nohup java -jar -Dspring.profiles.active=dev project.jar > ./output.log 2>&1 &
rm -rf /home/ubuntu/solitour-server/tobe
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: test

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Github Repository 에 올린 파일들을 볼러오기
uses: actions/checkout@v4

- name: JDK 17 버전 설치
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: application.yml 파일 만들기
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application.yml
echo "${{ secrets.APPLICATION_COMMON }}" > ./src/main/resources/application-common.yml
echo "${{ secrets.APPLICATION_TEST }}" > ./src/main/resources/application-test.yml
- name: gradlew 실행 권한 부여
run: chmod +x ./gradlew

- name: Gradle packages 캐시
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle
- name: Gradle wrapper 캐시
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

- name: 테스트
run : ./gradlew clean test -PspringProfile=test --info


185 changes: 185 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
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/
src/main/resources/application.properties

# AWS User-specific
.idea/**/aws.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Sonar template
#Sonar generated dir
/.sonar/

### SonarQube template
# SonarQube ignore files.
#
# https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
# Sonar Scanner working directories
.sonar/
.sonarqube/
.scannerwork/

# http://www.sonarlint.org/commandline/
# SonarLint working directories, configuration files (including credentials)
.sonarlint/

### Windows template
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# idea 전부 무시
.idea/**

# local docker db 파일
/docker/db/

# 설정 파일
/src/main/resources/**.yml
/src/main/resources/**.properties
src/main/resources/docs/index.html
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "gradle/wrapper/config"]
path = gradle/wrapper/config
url = https://github.com/TripInfoWeb/config.git
Loading

0 comments on commit bdebc7a

Please sign in to comment.