Page MenuHomePhabricator
Paste P7925

Proton staging config
ActivePublic

Authored by pmiazga on Dec 17 2018, 5:06 PM.
# 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 mb.
worker_heap_limit_mb: 250
# Logger info
logging:
level: trace
# streams:
# # Use gelf-stream -> logstash
# - type: gelf
# host: logstash1003.eqiad.wmnet
# port: 12201
# Statsd metrics reporter
metrics:
#type: log
#host: localhost
#port: 8125
services:
- name: proton
# 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: 3030
# 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
# 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: 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_whitelist:
# - cache-control
# - content-length
# - content-type
# - if-match
# - user-agent
# - x-request-id
# the user agent to use when issuing requests
user_agent: WMF Proton Renderer
mw_req:
method: get
uri: https://{{extdomain}}/w/index.php
query:
title: '{{request.params.title}}'
headers:
host: '{{request.params.domain}}'
x-subdomain: '{{if(request.params.mobile, "M", "")}}'
restbase_req:
method: '{{request.method}}'
uri: https://{{domain}}/api/rest_v1/{+path}
query: '{{ default(request.query, {}) }}'
headers: '{{request.headers}}'
body: '{{request.body}}'
# https://github.com/GoogleChrome/puppeteer/blob/v0.13.0/docs/api.md#pagepdfoptions
# Explicitly override defaults so that we don't have unexected results
# after puppeteer upgrades
pdf_options:
scale: 1
displayHeaderFooter: false
printBackground: false
landscape: false
pageRanges: ''
format: 'Letter'
margin:
top: '0.5in'
right: '0.5in'
# some room for page numbers
bottom: '0.75in'
left: '0.5in'
# https://github.com/GoogleChrome/puppeteer/blob/v0.13.0/docs/api.md#puppeteerlaunchoptions
puppeteer_options:
timeout: 30000
headless: true
executablePath: '/usr/bin/chromium'
args:
- '--no-sandbox'
- '--disable-setuid-sandbox'
- '--font-rendering-hinting=medium'
- '--enable-font-antialiasing'
- '--hide-scrollbars'
- '--disable-gpu'
- '--no-first-run'
# the maximum number of puppeteer instances that can be launched at a time
render_concurrency: 1
# don't wait to render a PDF after this many seconds
render_queue_timeout: 60
# the number of seconds before puppeteer terminates the browser instance
render_execution_timeout: 90
# maximum allowed number of pending jobs
max_render_queue_size: 3

Event Timeline

pmiazga created this paste.Dec 17 2018, 5:06 PM