-
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.
Merge pull request #58 from IxxP-Girls/comment
Chore: CD 스크립트에 deploy 추가, codedeploy 설정
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
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
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/ubuntu/ # source에서 지정된 파일을 받을 위치, 이후 jar를 실행하는 등은 destination에서 옮긴 파일들로 진행 | ||
overwrite: yes | ||
|
||
permissions: # CodeDeploy에서 EC2서버로 넘겨준 파일들을 모두 ubuntu 권한을 갖도록 합니다. | ||
- object: / | ||
pattern: "**" | ||
owner: ubuntu | ||
group: ubuntu | ||
|
||
# ApplicationStart 단계에서 deploy.sh를 실행시키도록 합 | ||
hooks: # CodeDeploy 배포 단계에서 실행할 명령어를 지정합니다. | ||
ApplicationStart: # deploy.sh를 ubuntu 권한으로 실행합니다. | ||
- location: scripts/deploy.sh | ||
timeout: 60 # 스크립트 실행 60초 이상 수행되면 실패가 됩니다. | ||
runas: ubuntu |