/
_config.yaml
101 lines (95 loc) · 3.87 KB
/
_config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{{- define "config.app" -}}
# Number of worker processes to spawn.
# Set to 0 to run everything in a single process without clustering.
# Use 'ncpu' to run as many workers as there are CPU units
num_workers: 2
# Number of workers to start in parallel after the first worker.
# The first worker is always started independently. After it has completed
# its start-up, this number controls the number of workers to start in
# parallel until `num_workers` have been started. Note that setting this
# number to a too high a value might lead to high resource consumption
# (especially of CPU) during the start-up process.
startup_concurrency: 1
# Log error messages and gracefully restart a worker if v8 reports that it
# uses more heap (note: not RSS) than this many mb.
worker_heap_limit_mb: 750
# The maximum interval in ms that can pass between two beat messages
# sent by each worker to the master before it is killed
worker_heartbeat_timeout: 15000
# Logger info
logging:
level: warn
name: push-notifications
streams:
- type: stdout
named_levels: true
{{- if .Values.monitoring.enabled }}
# Statsd metrics reporter
metrics:
port: 9102
type: prometheus
{{- end }}
services:
- name: push-notifications
# a relative path or the name of an npm package, if different from name
module: ./dist/app.js
# per-service config
conf:
port: {{ .Values.app.port }}
# interface: localhost # uncomment to only listen on localhost
# more per-service config settings
# the location of the spec, defaults to spec.yaml if not specified
# spec: ./spec.template.yaml
# allow cross-domain requests to the API (default '*')
cors: '*'
# to disable use:
# cors: false
# to restrict to a particular domain, use:
# cors: restricted.domain.org
# content for the CSP headers
# csp: false # uncomment this line to disable sending them
# URL of the outbound proxy to use (complete with protocol)
proxy: {{ .Values.main_app.proxy | default "" }}
# the list of domains for which not to use the proxy defined above
# no_proxy_list:
# - domain1.com
# - domain2.org
# the list of incoming request headers that can be logged; if left empty,
# the following headers are allowed: cache-control, content-length,
# content-type, if-match, user-agent, x-request-id
# log_header_whitelist:
# - cache-control
# - content-length
# - content-type
# - if-match
# - user-agent
# - x-request-id
# User-Agent HTTP header to use for requests
user_agent: "PushNotifications/WMF"
queueing:
flushTimeoutMs: {{ .Values.main_app.queueing.flush_timeout_ms }}
flushTimeoutMin: {{ .Values.main_app.queueing.flush_timeout_min }}
flushTimeoutMax: {{ .Values.main_app.queueing.flush_timeout_max }}
verbose: {{ .Values.main_app.queueing.verbose }}
# Apple Push Notification Service (APNS) config
apns:
debug_topics: {{ .Values.main_app.apns.debug_topics }}
mock: {{ .Values.main_app.apns.mock }}
production: {{ .Values.main_app.apns.production }}
token:
key: {{ .Values.main_app.apns.token.key }}
keyId: {{ .Values.main_app.apns.token.keyId }}
teamId: {{ .Values.main_app.apns.token.teamId }}
# the template used for contacting the MW API
mwapi_req:
method: post
uri: {{ .Values.main_app.mwapi_uri }}
headers:
host: {{ .Values.main_app.mwapi_host_header }}
user-agent: '{{ `{{user-agent}}` }}'
x-forwarded-proto: https
body: '{{ `{{ default(request.query, {}) }}` }}'
mw_subscription_manager_username: {{ .Values.main_app.mw_subscription_manager_username }}
mw_subscription_manager_password: {{ .Values.main_app.mw_subscription_manager_password }}
debug: true
{{- end -}}