Giter Site home page Giter Site logo

docker-parsoid's Introduction

Containerized MediaWiki parsoid service

This repo contains Docker container to run the Parsoid application.

It is a part of Containerized Mediawiki install project.

Settings

  • PARSOID_DOMAIN_{domain} defines uri and domain for parsoid service. The '{domain}' word should be the same as MW_REST_DOMAIN parameter in MediaWiki web container. You can specify any number of such variables (by the number of domains for the service)
  • PARSOID_NUM_WORKERS defines the number of worker processes to the parsoid service. Set to 0 to run everything in a single process without clustering. Use ncpu to run as many workers as there are CPU units.
  • PARSOID_LOGGING_LEVEL by default info

Examples

The environment variable PARSOID_DOMAIN_web=http://web/w/api.php creates config contains:

mwApis:
  -
    uri: 'http://web/w/api.php'
    domain: 'web'

how to run

The domain must be the same as mediawiki

$wgVirtualRestConfig['modules']['parsoid'] = array(
    // URL to the Parsoid instance
    // Use port 8142 if you use the Debian package
    'url' => 'http://10.0.20.29:8081',
    // Parsoid "domain", see below (optional)
    'domain' => '10.0.20.29',
    // Parsoid "prefix", see below (optional)
    'prefix' => '10.0.20.29',
    'forwardCookies' => false,
    'restbaseCompat' => null
);

one wiki

docker run -it -p 8081:8000 -e PARSOID_API_1=http://xxx:8080/w/api.php -e PARSOID_DOMAIN_1=xxx loverszhaokai/parsoid:0.9.0

more wiki

docker run -it -p 8081:8000 -e PARSOID_API_1=http://xxx:8080/w/api.php -e PARSOID_DOMAIN_1=xxx -e PARSOID_API_2=http://yyy:8081/w/api.php -e PARSOID_DOMAIN_2=yyy  loverszhaokai/parsoid:0.9.0

docker-parsoid's People

Contributors

loverszhaokai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.