Created
July 14, 2016 09:52
-
-
Save makeittotop/1394226fec1c9c27fb72f728e92a6870 to your computer and use it in GitHub Desktop.
AWS CodeDeploy Sample appspec.yml
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
version: 0.0 | |
os: linux | |
files: | |
- source: /index.html | |
destination: /var/www/html/ | |
hooks: | |
BeforeInstall: | |
- location: scripts/install_dependencies | |
timeout: 300 | |
runas: root | |
- location: scripts/start_server | |
timeout: 300 | |
runas: root | |
ApplicationStop: | |
- location: scripts/stop_server | |
timeout: 300 | |
runas: root | |
[]$ cat scripts/install_dependencies | |
#!/bin/bash | |
yum install -y httpd | |
[]$ cat scripts/start_server | |
#!/bin/bash | |
service httpd start | |
[apareek@foo my_sample_app]$ cat scripts/stop_server | |
#!/bin/bash | |
isExistApp = `pgrep httpd` | |
if [[ -n $isExistApp ]]; then | |
service httpd stop | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment