From 0977877dcda003860ce5fd2847471209f4434592 Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Thu, 3 Dec 2015 09:38:02 +0000 Subject: [PATCH] AWS codedeploy start / stop scripts (upstart) and wsgi start script --- scripts/aws_start_app.sh | 5 +++++ scripts/aws_stop_app.sh | 5 +++++ wsgi.py | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100755 scripts/aws_start_app.sh create mode 100755 scripts/aws_stop_app.sh create mode 100644 wsgi.py diff --git a/scripts/aws_start_app.sh b/scripts/aws_start_app.sh new file mode 100755 index 000000000..1c3743f2c --- /dev/null +++ b/scripts/aws_start_app.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "Starting application" +cd ~/notifications-admin/; +sudo service notifications-admin start \ No newline at end of file diff --git a/scripts/aws_stop_app.sh b/scripts/aws_stop_app.sh new file mode 100755 index 000000000..0a58f810c --- /dev/null +++ b/scripts/aws_stop_app.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "Stopping application" +cd ~/notifications-admin/; +sudo service notifications-admin stop \ No newline at end of file diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 000000000..5f2a40ec0 --- /dev/null +++ b/wsgi.py @@ -0,0 +1,7 @@ +from app import create_app +import os + +application = create_app(os.getenv('NOTIFICATIONS_ADMIN_ENVIRONMENT') or 'development') + +if __name__ == "__main__": + application.run() \ No newline at end of file