Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/wsb0722/recordary_pc
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-wi committed May 11, 2020
2 parents f22e5c2 + 551466e commit 6f7ce4a
Show file tree
Hide file tree
Showing 152 changed files with 5,002 additions and 3,499 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ out/
/.nb-gradle/

### VS Code ###
.vscode/
.vscode/

### AWS ###
aws.yml
22 changes: 10 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ cache:

before_install:
- chmod +x gradlew
- nvm install --lts
- nvm use stable

script: "./gradlew -x clean build"
script: './gradlew -x clean build'

before_deploy:
- zip -r recordary_pc *
- mkdir -p deploy
- mv recordary_pc.zip deploy/recordary_pc.zip
- rm -rf frontend/node_modules
- rm -rf frontend/build
- mkdir -p before-deploy
- cp scripts/*.sh before-deploy/
- cp appspec.yml before-deploy/
- cp build/libs/*.jar before-deploy/
- cd before-deploy && zip -r before-deploy *
- cd ../ && mkdir -p deploy
- mv before-deploy/before-deploy.zip deploy/recordary_pc.zip

deploy:
- provider: s3
Expand All @@ -39,9 +43,6 @@ deploy:
acl: private # zip 파일 접근을 private로
local_dir: deploy # before_deploy에서 생성한 디렉토리
wait-until-deployed: true
on:
repo: wsb0722/recordary_pc
branch: master

- provider: codedeploy
access_key_id: $AWS_ACCESS_KEY # Travis repo settings에 설정된 값
Expand All @@ -53,9 +54,6 @@ deploy:
deployment_group: recordary-springboot-webservice-group # 웹 콘솔에서 등록한 CodeDeploy 배포 그룹
region: ap-northeast-2
wait-until-deployed: true
on:
repo: wsb0722/recordary_pc
branch: master

# CI 실행 완료 시 메일로 알람
notifications:
Expand Down
28 changes: 25 additions & 3 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/app/step2/zip/
overwrite: yes
- source: /
destination: /home/ec2-user/app/step3/zip/
overwrite: yes

permissions:
- object: /
pattern: "**"
owner: ec2-user
group: ec2-user

hooks:
AfterInstall:
- location: stop.sh
timeout: 60
runas: ec2-user

ApplicationStart:
- location: start.sh
timeout: 60
runas: ec2-user

ValidateService:
- location: health.sh
timeout: 60
runas: ec2-user
32 changes: 18 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ buildscript {
mooworkVersion = '1.2.0'
}
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
Expand All @@ -22,18 +24,21 @@ apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.moowork.node'

group 'com.fairy_pitt'
version '1.0-SNAPSHOT'
version '1.0.1-SNAPSHOT-' + new Date().format("yyyyMMddHHmmss")

mainClassName = 'com.fairy_pitt.recordary.RecordaryApplication'
sourceCompatibility = 1.8

repositories {
mavenCentral()
maven { url 'https://repo.spring.io/libs-milestone'}
jcenter()
}

dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.springframework.boot:spring-boot-starter-jdbc')
implementation('org.projectlombok:lombok')
implementation('org.springframework.boot:spring-boot-configuration-processor')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
Expand All @@ -43,6 +48,7 @@ dependencies {
implementation('org.springframework.boot:spring-boot-devtools')
implementation('org.json:json:20180813')
implementation('joda-time:joda-time:2.2')
implementation('org.springframework.cloud:spring-cloud-starter-aws:2.2.1.RELEASE')

annotationProcessor ('org.projectlombok:lombok')
annotationProcessor ('org.springframework.boot:spring-boot-configuration-processor')
Expand All @@ -59,23 +65,21 @@ dependencies {

def webappDir = "$projectDir/frontend"

task frontBuild {
doLast {
exec {
workingDir "${webappDir}"
commandLine "npm", "install"
}
exec {
workingDir "${webappDir}"
commandLine "npm", "run-script", "build"
}
}
task appNpmInstall(type: NpmTask) {
workingDir = file("${webappDir}")
args = ['install']
}

task npmBuild(type: NpmTask) {
workingDir = file("${webappDir}")
args = ['run', 'build']
}

task copyWebApp(type: Copy) {
from 'frontend/build'
into 'build/resources/main/static/.'
}

copyWebApp.dependsOn frontBuild
compileJava.dependsOn copyWebApp
npmBuild.dependsOn("appNpmInstall")
copyWebApp.dependsOn("npmBuild")
compileJava.dependsOn("copyWebApp")
Loading

0 comments on commit 6f7ce4a

Please sign in to comment.