-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappspec.yml
24 lines (22 loc) ยท 1.15 KB
/
appspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
version: 0.0
os: linux
# S3์ ์๋ zip ํ์ผ์ด EC2์ ๋ฐฐํฌ๋ ์์น๋ฅผ ์ง์
files:
- source: / # CodeDeploy์์ ์ ๋ฌํด ์ค ํ์ผ ์ค destination์ผ๋ก ์ด๋์ํฌ ๋์์ ๋ฃจํธ๋ก ์ง์ (์ ์ฒดํ์ผ)
destination: /home/ubuntu/app # source์์ ์ง์ ๋ ํ์ผ์ ๋ฐ์ ์์น, ์ดํ jar๋ฅผ ์คํํ๋ ๋ฑ์ destination์์ ์ฎ๊ธด ํ์ผ๋ค๋ก ์งํ
overwrite: yes
permissions: # CodeDeploy์์ EC2์๋ฒ๋ก ๋๊ฒจ์ค ํ์ผ๋ค์ ๋ชจ๋ ec2-user๊ถํ์ ๊ฐ๋๋ก ํฉ๋๋ค.
- object: /
pattern: "**"
owner: ubuntu
group: ubuntu
# ApplicationStart ๋จ๊ณ์์ deploy.sh๋ฅผ ์คํ์ํค๋๋ก ํฉ
hooks: # CodeDeploy๋ฐฐํฌ ๋จ๊ณ์์ ์คํํ ๋ช
๋ น์ด๋ฅผ ์ง์ ํฉ๋๋ค.
AfterInstall: # CodeDeploy์ AfterInstall ๋จ๊ณ์์ ์คํ
- location: scripts/stop.sh # hooks์์ ์คํํ ์คํฌ๋ฆฝํธ์ ์์น
timeout: 60 # ์คํฌ๋ฆฝํธ ์คํ์ ํ์ฉ๋๋ ์ต๋ ์๊ฐ, ๋์ผ๋ฉด ๋ฐฐํฌ ์คํจ
runas: ubuntu # ์คํฌ๋ฆฝํธ๋ฅผ ์คํํ๋ ์ฌ์ฉ์
ApplicationStart: # CodeDeploy์ ApplicationStart ๋จ๊ณ์์ ์คํ
- location: scripts/start.sh
timeout: 60
runas: ubuntu