Compare commits

...

3 Commits

Author SHA1 Message Date
David McDonald
226815b7d8 more wip 2020-06-16 13:59:15 +01:00
Pea Tyczynska
f718b71dba Make freeze requirements 2020-06-16 12:31:39 +01:00
David McDonald
e674a3ca22 wip 2020-06-16 12:22:24 +01:00
6 changed files with 17 additions and 11 deletions

View File

@@ -2,9 +2,12 @@
from __future__ import print_function
from flask import Flask
import psycogreen.eventlet
from app import create_app
psycogreen.eventlet.patch_psycopg()
application = Flask('app')
create_app(application)

View File

@@ -6,7 +6,7 @@ import gunicorn
from gds_metrics.gunicorn import child_exit # noqa
workers = 4
worker_class = "eventlet"
worker_class = "gevent"
worker_connections = 256
errorlog = "/home/vcap/logs/gunicorn_error.log"
bind = "0.0.0.0:{}".format(os.getenv("PORT"))

View File

@@ -1,6 +1,6 @@
{%- set app_vars = {
'notify-api': {
'NOTIFY_APP_NAME': 'api',
'notify-api-canary1': {
'NOTIFY_APP_NAME': 'api-canary1',
'disk_quota': '2G',
'sqlalchemy_pool_size': 30,
'routes': {
@@ -12,8 +12,8 @@
'health-check-invocation-timeout': 3,
'instances': {
'preview': None,
'staging': None,
'production': 25
'staging': 1,
'production': 1
},
},
'notify-api-db-migration': {

View File

@@ -10,13 +10,14 @@ Flask-Migrate==2.5.3
git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108
Flask==1.1.2
click-datetime==0.2
eventlet==0.25.2
gevent==20.6.1
gunicorn==20.0.4
iso8601==0.1.12
itsdangerous==1.1.0
jsonschema==3.2.0
marshmallow-sqlalchemy==0.23.0
marshmallow==2.21.0 # pyup: <3 # v3 throws errors
psycogreen==1.0.2
psycopg2-binary==2.8.5
PyJWT==1.7.1
SQLAlchemy==1.3.17

View File

@@ -12,13 +12,14 @@ Flask-Migrate==2.5.3
git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108
Flask==1.1.2
click-datetime==0.2
eventlet==0.25.2
gevent==20.6.1
gunicorn==20.0.4
iso8601==0.1.12
itsdangerous==1.1.0
jsonschema==3.2.0
marshmallow-sqlalchemy==0.23.0
marshmallow==2.21.0 # pyup: <3 # v3 throws errors
psycogreen==1.0.2
psycopg2-binary==2.8.5
PyJWT==1.7.1
SQLAlchemy==1.3.17
@@ -39,19 +40,18 @@ alembic==1.4.2
amqp==1.4.9
anyjson==0.3.3
attrs==19.3.0
awscli==1.18.75
awscli==1.18.80
bcrypt==3.1.7
billiard==3.3.0.23
bleach==3.1.4
blinker==1.4
boto==2.49.0
boto3==1.10.38
botocore==1.16.25
botocore==1.17.3
certifi==2020.4.5.2
chardet==3.0.4
click==7.1.2
colorama==0.4.3
dnspython==1.16.0
docutils==0.15.2
flask-redis==0.4.0
future==0.18.2
@@ -88,3 +88,5 @@ urllib3==1.25.9
webencodings==0.5.1
Werkzeug==1.0.1
zipp==3.1.0
zope.event==4.4
zope.interface==5.1.0

View File

@@ -1,6 +1,6 @@
#!/bin/bash
case $NOTIFY_APP_NAME in
api)
api|api-canary1)
unset GUNICORN_CMD_ARGS
exec scripts/run_app_paas.sh gunicorn -c /home/vcap/app/gunicorn_config.py application
;;