mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Merge pull request #2505 from alphagov/healthcheck
add routes for all apps
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
{%- set app_vars = {
|
{%- set app_vars = {
|
||||||
'notify-api': {'NOTIFY_APP_NAME': 'api', 'disk_quota': '2G', 'sqlalchemy_pool_size': 20, 'routes': {
|
'notify-api': {'NOTIFY_APP_NAME': 'api', 'disk_quota': '2G', 'sqlalchemy_pool_size': 20, 'routes': {
|
||||||
'preview': ['notify-api-preview.cloudapps.digital', 'api.notify.works'],
|
'preview': ['api.notify.works'],
|
||||||
'staging': ['notify-api-staging.cloudapps.digital', 'api.staging-notify.works'],
|
'staging': ['api.staging-notify.works'],
|
||||||
'production': ['notify-api-production.cloudapps.digital', 'api.notifications.service.gov.uk'],
|
'production': ['api.notifications.service.gov.uk'],
|
||||||
}
|
},
|
||||||
|
'healthcheck-endpoint': '/_status?simple=true',
|
||||||
},
|
},
|
||||||
'notify-api-db-migration': {'NOTIFY_APP_NAME': 'api', 'instances': 0},
|
'notify-api-db-migration': {'NOTIFY_APP_NAME': 'api', 'instances': 0},
|
||||||
|
|
||||||
@@ -33,24 +34,24 @@ applications:
|
|||||||
memory: {{ app.get('memory', '1G') }}
|
memory: {{ app.get('memory', '1G') }}
|
||||||
disk_quota: {{ app.get('disk_quota', '1G')}}
|
disk_quota: {{ app.get('disk_quota', '1G')}}
|
||||||
|
|
||||||
{% if 'routes' in app -%}
|
|
||||||
routes:
|
routes:
|
||||||
{%- for route in app['routes'][environment] %}
|
{%- for route in app.get('routes', {}).get(environment, []) %}
|
||||||
- route: {{ route }}
|
- route: {{ route }}
|
||||||
{%- endfor -%}
|
{%- endfor%}
|
||||||
{%- elif environment in app.get('local_statsd', []) -%}
|
|
||||||
health-check-type: none
|
|
||||||
routes:
|
|
||||||
- route: {{ CF_APP }}-{{ environment }}.cloudapps.digital
|
- route: {{ CF_APP }}-{{ environment }}.cloudapps.digital
|
||||||
{%- else -%}
|
{% if 'healthcheck-endpoint' in app %}
|
||||||
health-check-type: none
|
health-check-type: http
|
||||||
no-route: true
|
health-check-http-endpoint: {{ app['healthcheck-endpoint'] }}
|
||||||
|
{% else %}
|
||||||
|
health-check-type: process
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- notify-db
|
- notify-db
|
||||||
- logit-ssl-syslog-drain
|
- logit-ssl-syslog-drain
|
||||||
{% if environment in app.get('local_statsd', []) %}- notify-prometheus{% endif %}
|
{% if environment in app.get('local_statsd', []) -%}
|
||||||
|
- notify-prometheus
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NOTIFY_APP_NAME: {{ app.get('NOTIFY_APP_NAME', CF_APP.replace('notify-', '')) }}
|
NOTIFY_APP_NAME: {{ app.get('NOTIFY_APP_NAME', CF_APP.replace('notify-', '')) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user