Skip to content

Instantly share code, notes, and snippets.

@Pchelolo
Created November 30, 2018 16:52
Show Gist options
  • Save Pchelolo/14b3da533592f9ed3477031af17e8752 to your computer and use it in GitHub Desktop.
Save Pchelolo/14b3da533592f9ed3477031af17e8752 to your computer and use it in GitHub Desktop.
Linux proton1002 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64
Debian GNU/Linux 9.5 (stretch)
proton1002 is a Chromium-based PDF renderer (proton)
The last Puppet run was at Fri Nov 30 16:37:56 UTC 2018 (13 minutes ago).
Debian GNU/Linux 9 auto-installed on Wed Apr 25 13:53:57 UTC 2018.
Last login: Fri Nov 30 16:43:23 2018 from 198.35.26.5
ppchelko@proton1002:~$
ppchelko@proton1002:~$ cat /etc/proto
protocols proton/
ppchelko@proton1002:~$ cat /etc/proton/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: 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: 600
# 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: 7500
# Logger info
logging:
level: warn
name: proton
streams:
- host: logstash.svc.eqiad.wmnet
port: 12201
type: gelf
- level: info
path: /srv/log/proton/main.log
type: file
# Statsd metrics reporter
metrics:
name: proton
host: statsd.eqiad.wmnet
port: 8125
type: statsd
services:
- name: proton
# a relative path or the name of an npm package, if different from name
module: ./src/app.js
# per-service config
conf:
port: 24766
# 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: http://url-downloader.eqiad.wikimedia.org:8080
# the list of domains for which not to use the proxy defined above
# no_proxy_list:
# - eqiad.wmnet
# - codfw.wmnet
# - discovery.wmnet
# 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: "Proton/WMF"
# the request template for contacting the MW appservers
mw_req:
method: get
uri: 'http://api-rw.discovery.wmnet/w/index.php'
query:
title: '{{request.params.title}}'
headers:
host: '{{request.params.domain}}'
x-subdomain: '{{if(request.params.mobile, "M", "")}}'
# the request template for contacting RESTBase
restbase_req:
method: "{{request.method}}"
uri: http://restbase.discovery.wmnet:7231/{{domain}}/v1/{+path}
query: "{{ default(request.query, {}) }}"
headers: "{{request.headers}}"
body: "{{request.body}}"
pdf_options:
scale: 1
displayHeaderFooter: false
printBackground: false
landscape: false
pageRanges: ''
format: 'Letter'
margin:
top: '0.5in'
right: '0.5in'
bottom: '0.75in'
left: '0.5in'
puppeteer_options:
ignoreHTTPSErrors: true
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'
render_concurrency: 3
render_queue_timeout: 60
render_execution_timeout: 90
max_render_queue_size: 50
queue_health_logging_interval: 3600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment