-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ec2-user/action/ # source에서 지정된 파일을 받을 위치, 이후 jar를 실행하는 등은 destination에서 옮긴 파일들로 진행 | ||
overwrite: yes | ||
|
||
permissions: # CodeDeploy에서 EC2서버로 넘겨준 파일들을 모두 ec2-user권한을 갖도록 합니다. | ||
- object: / | ||
pattern: "**" | ||
owner: ec2-user | ||
group: ec2-user | ||
|
||
# ApplicationStart 단계에서 deploy.sh를 실행시키도록 합 | ||
hooks: # CodeDeploy배포 단계에서 실행할 명령어를 지정합니다. | ||
ApplicationStart: # deploy.sh를 ec2-user권한으로 실행합니다. | ||
- location: scripts/deploy.sh | ||
timeout: 60 # 스크립트 실행 60초 이상 수행되면 실패가 됩니다. | ||
runas: ec2-user |