forked from wikimedia/mediawiki-services-mobileapps
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.prod.yaml
117 lines (113 loc) · 4.73 KB
/
config.prod.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# 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: ncpu
# 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: 500
# Logger info
logging:
level: warn
streams:
- type: stdout # log to stdout
named_levels: true # emit log level name instead of index. e.g. INFO vs 30
- type: gelf
host: logstash1003.eqiad.wmnet
port: 12201
# Statsd metrics reporter
metrics:
type: statsd
host: statsd.eqiad.wmnet
port: 8125
services:
- name: service-mobileapp-node
# a relative path or the name of an npm package, if different from name
module: ./app.js
# optionally, a version constraint of the npm package
# version: ^0.4.0
# per-service config
conf:
port: 8888
# 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
# CSP for mobile-html
## Documentation for mobile-html CSP policy directives:
## img-src
## We need to specifically allow data: URIs for the buttons from pagelib.
## We need to specifically allow wikimedia.org URIs for Mathoid images.
## *.wikimedia.org also includes upload.wikimedia.org for Commons images.
## script-src
## The pagelib JavaScript bundle is served on meta.wikimedia.org.
## We also add a small piece of inline JS to the end of the body to trigger lazy-loading.
## style-src
## The site CSS bundle is served from the current domain (TODO: currently assumes WP).
## The base CSS bundle is served on meta.wikimedia.org.
## The pages also have some inline styles.
mobile_html_csp: "default-src 'none';
connect-src app://*.wikipedia.org https://*.wikipedia.org;
media-src app://upload.wikimedia.org https://upload.wikimedia.org 'self';
img-src app://*.wikimedia.org https://*.wikimedia.org app://wikimedia.org https://wikimedia.org 'self' data:;
object-src 'none';
script-src app://meta.wikimedia.org https://meta.wikimedia.org 'unsafe-inline';
style-src app://meta.wikimedia.org https://meta.wikimedia.org app://*.wikipedia.org https://*.wikipedia.org 'self' 'unsafe-inline';
frame-ancestors 'self'
"
# URL of the outbound proxy to use (complete with protocol)
# proxy: http://my.proxy.org:8080
# 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_allowlist:
# - cache-control
# - content-length
# - content-type
# - if-match
# - user-agent
# - x-request-id
# the user agent to use when issuing requests
user_agent: WMF Mobile Content Service
# REST API base URIs
mobile_html_rest_api_base_uri: '//meta.wikimedia.org/api/rest_v1/'
mobile_html_local_rest_api_base_uri_template: '//{{domain}}/api/rest_v1/'
# the template used for contacting the MW API
#
# # Max JSON POST body size limit.
# max_body_size: 100kb
mwapi_req:
method: post
uri: http://api.svc.eqiad.wmnet/w/api.php
headers:
host: '{{request.params.domain}}'
user-agent: '{{user-agent}}'
accept-language: '{{accept-language}}'
body: '{{ default(request.query, {}) }}'
# the template used for requesting ResourceLoader module content from load.php
mw_resource_loader_req:
method: post
uri: http://appservers-rw.discovery.wmnet/w/load.php
headers:
host: '{{request.params.domain}}'
user-agent: '{{user-agent}}'
body: '{{ default(request.query, {}) }}'
# the template used for contacting RESTBase
restbase_req:
method: '{{request.method}}'
uri: http://restbase.svc.eqiad.wmnet/{{domain}}/v1/{+path}
query: '{{ default(request.query, {}) }}'
headers: '{{request.headers}}'
body: '{{request.body}}'
timeout: 60000 # 60 * 1000