Skip to content

Commit

Permalink
Merge pull request #22 from Tune-Fun/configuration/workflow/code_depl…
Browse files Browse the repository at this point in the history
…oy_appspec

config(workflow): cd
  • Loading branch information
habinkim authored Mar 7, 2024
2 parents ed38cdd + 1f881c9 commit 2d09849
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 0.0
os: linux
# S3에 있는 zip 파일이 EC2에 배포될 위치를 지정
files:
- source: / # CodeDeploy에서 전달해 준 파일 중 destination으로 이동시킬 대상을 루트로 지정(전체파일)
destination: /home/habin/action/ # source에서 지정된 파일을 받을 위치, 이후 jar를 실행하는 등은 destination에서 옮긴 파일들로 진행
overwrite: yes

permissions: # CodeDeploy에서 EC2서버로 넘겨준 파일들을 모두 habin 권한을 갖도록 합니다.
- object: /
pattern: "**"
owner: habin
group: habin

# ApplicationStart 단계에서 deploy.sh를 실행시키도록 합
hooks: # CodeDeploy배포 단계에서 실행할 명령어를 지정합니다.
ApplicationStart: # deploy.sh를 ec2-user권한으로 실행합니다.
- location: scripts/deploy.sh
timeout: 60 # 스크립트 실행 60초 이상 수행되면 실패가 됩니다.
runas: habin

0 comments on commit 2d09849

Please sign in to comment.