From 208630872cefd3003c20805e5a1f36f1a251efc7 Mon Sep 17 00:00:00 2001 From: Dakota Benjamin Date: Fri, 9 Aug 2019 11:27:45 -0400 Subject: [PATCH] Add app logging and increase gunicorn timeout --- Dockerfile | 2 +- devops/ml-enabler.template.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a816ba7b..cf29fd1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN \ pip install gunicorn; \ pip install -r requirements.txt -CMD gunicorn --bind 0.0.0.0:5000 'ml_enabler:create_app()' +CMD gunicorn --bind 0.0.0.0:5000 --timeout 120 'ml_enabler:create_app()' diff --git a/devops/ml-enabler.template.js b/devops/ml-enabler.template.js index 3bbcee94..f689eaef 100644 --- a/devops/ml-enabler.template.js +++ b/devops/ml-enabler.template.js @@ -96,8 +96,20 @@ const Resources = { { Name: "FLASK_APP", Value: "ml_enabler" + }, + { + Name: "ECS_LOG_LEVEL", + Value: "debug" } ], + LogConfiguration: { + LogDriver: "awslogs", + Options: { + "awslogs-group": cf.join("-", ["awslogs", cf.stackName]), + "awslogs-region": "us-east-1", + "awslogs-stream-prefix": cf.join("-", ["awslogs", cf.stackName]) + } + }, Essential: true }, {