Page MenuHomePhabricator
Authored By
colewhite
Mar 26 2021, 3:52 PM
Size
4 KB
Referenced Files
None
Subscribers
None

config.yaml

# 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: 0
# Log error messages and gracefully restart a worker if v8 reports that it
# uses more heap (note: not RSS) than this many megabytes.
worker_heap_limit_mb: 250
# Logger info
logging:
level: trace
streams:
- type: stdout # log to stdout
named_levels: true # emit log level name instead of index. e.g. INFO vs 30
# # Use gelf-stream -> logstash
# - type: gelf
# host: logstash1003.eqiad.wmnet
# port: 12201
# Statsd metrics reporter
metrics:
- type: prometheus
port: 9090
- type: statd
host: localhost
port: 8125
- type: log
ratelimiter:
type: memory
services:
- name: cxserver
# 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: 8080
# private_key: path to private key file for enabling https
# certificate: path to certificate file for enabling https
# 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.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
# 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
user_agent: cxserver
# Mediawiki host name. Example {lang}.wikisource.org which get expanded internally to
# es.wikisource.org in a spanish language context.
# Do not prefix with http or https://
# mw_host: '{lang}.wikipedia.org'
mwapi_req:
body: "{{request.body}}"
query: "{{ default(request.query, {}) }}"
headers:
host: "{{request.params.domain}}"
user-agent: "{{user-agent}}"
method: post
uri: "https://{{domain}}/w/api.php"
restbase_req:
method: '{{request.method}}'
uri: https://{{domain}}/api/rest_v1/{+path}
query: '{{ default(request.query, {}) }}'
headers: '{{request.headers}}'
body: '{{request.body}}'
jwt:
secret: ''
algorithms:
- HS256
ratelimiter_key: x-client-ip # The request header field that uniquely identify a request source
ratelimiter_rate: 10
languages: config/languages.yaml
templatemapping:
database: config/templatemapping.db
sectionmapping:
database: config/cx-section-titles-aligned.db
mt:
Apertium:
api: https://apertium.wmflabs.org
# For packaging reasons use separate configuration
languages: config/Apertium.yaml
Google:
api: https://www.googleapis.com/language/translate/v2
key: null
languages: config/Google.yaml
Yandex:
api: https://translate.yandex.net
key: null
languages: config/Yandex.yaml
Youdao:
api: https://openapi.youdao.com/api
appKey: null
appSecret: null
languages: config/Youdao.yaml
Matxin:
api: http://matxin.elhuyar.eus/API
languages: config/Matxin.yaml
key: null
LingoCloud:
api: https://api.interpreter.caiyunai.com/v1
account: wikimedia
key: null
languages: config/LingoCloud.yaml
OpusMT:
api: https://opusmt.wmflabs.org/api/translate
languages: config/OpusMT.yaml
TestClient:
languages: config/TestClient.yaml
dictionary:
Dictd:
languages: config/Dictd.yaml
JsonDict:
languages: config/JsonDict.yaml

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8936626
Default Alt Text
config.yaml (4 KB)

Event Timeline