mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Add http health-check for the api app
Also rename the 'elb' argument to 'simple' to be more descriptive. The healthcheck is going to issue requests to `/_status?simple=true` just to check that gunicorn is up and running - we don't need to go all the way to the database, as this would have adverse impact when api is under load.
This commit is contained in:
@@ -11,7 +11,7 @@ status = Blueprint('status', __name__)
|
|||||||
|
|
||||||
@status.route('/_status', methods=['GET', 'POST'])
|
@status.route('/_status', methods=['GET', 'POST'])
|
||||||
def show_status():
|
def show_status():
|
||||||
if request.args.get('elb', None):
|
if request.args.get('simple', None):
|
||||||
return jsonify(status="ok"), 200
|
return jsonify(status="ok"), 200
|
||||||
else:
|
else:
|
||||||
return jsonify(
|
return jsonify(
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ memory: 1G
|
|||||||
|
|
||||||
applications:
|
applications:
|
||||||
- name: notify-api
|
- name: notify-api
|
||||||
|
health-check-type: http
|
||||||
|
health-check-http-endpoint: /_status?simple=true
|
||||||
|
|
||||||
- name: notify-api-db-migration
|
- name: notify-api-db-migration
|
||||||
command: sleep infinity
|
command: sleep infinity
|
||||||
|
|||||||
Reference in New Issue
Block a user