Adding AWS code deploy files

- app spec file forms basis of application deploy
- various AWS specific files to install dependencies and call upstart for start and stop application
This commit is contained in:
Martyn Inglis
2015-12-15 16:26:56 +00:00
parent e0f22f7670
commit aa8caf8455
4 changed files with 34 additions and 0 deletions

23
appspec.yml Normal file
View File

@@ -0,0 +1,23 @@
---
files:
-
destination: /home/ubuntu/notifications-api
source: /
hooks:
AfterInstall:
-
location: scripts/aws_install_dependencies.sh
runas: root
timeout: 300
ApplicationStart:
-
location: scripts/aws_start_app.sh
runas: root
timeout: 300
ApplicationStop:
-
location: scripts/aws_stop_app.sh
runas: root
timeout: 300
os: linux
version: 0.0

View File

@@ -0,0 +1 @@
pip install -r /home/ubuntu/notifications-api/requirements.txt

5
scripts/aws_start_app.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
echo "Starting application"
cd ~/notifications-api/;
sudo service notifications-api start

5
scripts/aws_stop_app.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
echo "Stopping application"
cd ~/notifications-api/;
sudo service notifications-api stop