This commit is contained in:
David McDonald
2020-06-16 12:22:24 +01:00
parent eec2c2859e
commit e674a3ca22
4 changed files with 8 additions and 7 deletions

View File

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

View File

@@ -1,6 +1,6 @@
{%- set app_vars = { {%- set app_vars = {
'notify-api': { 'notify-api-canary1': {
'NOTIFY_APP_NAME': 'api', 'NOTIFY_APP_NAME': 'api-canary1',
'disk_quota': '2G', 'disk_quota': '2G',
'sqlalchemy_pool_size': 30, 'sqlalchemy_pool_size': 30,
'routes': { 'routes': {
@@ -12,8 +12,8 @@
'health-check-invocation-timeout': 3, 'health-check-invocation-timeout': 3,
'instances': { 'instances': {
'preview': None, 'preview': None,
'staging': None, 'staging': 1,
'production': 25 'production': 1
}, },
}, },
'notify-api-db-migration': { '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 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108
Flask==1.1.2 Flask==1.1.2
click-datetime==0.2 click-datetime==0.2
eventlet==0.25.2 gevent==20.6.1
gunicorn==20.0.4 gunicorn==20.0.4
iso8601==0.1.12 iso8601==0.1.12
itsdangerous==1.1.0 itsdangerous==1.1.0
jsonschema==3.2.0 jsonschema==3.2.0
marshmallow-sqlalchemy==0.23.0 marshmallow-sqlalchemy==0.23.0
marshmallow==2.21.0 # pyup: <3 # v3 throws errors marshmallow==2.21.0 # pyup: <3 # v3 throws errors
psycogreen==1.0.2
psycopg2-binary==2.8.5 psycopg2-binary==2.8.5
PyJWT==1.7.1 PyJWT==1.7.1
SQLAlchemy==1.3.17 SQLAlchemy==1.3.17

View File

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