This repo contains a Docker image to run the Parsoid application. See the full Parsoid/Setup documentation for help.
scwiki/parsoid:0.12.0
- Alpine
- Parsoid
To start Parsoid run the command below. Just pay attention to the MediaWiki version and choose a compatible Parsoid version.
# For MediaWiki >= 1.35
docker run -d -p 8080:8000 -e PARSOID_ENABLE_LINTER=true -e PARSOID_DOMAIN_localhost=http://localhost/w/api.php scwiki/parsoid:0.12.0
How to add more than one domain:
docker run -d -p 8080:8000 \
-e PARSOID_DOMAIN_foobar=http://foobar.com/w/api.php \
-e PARSOID_DOMAIN_example=http://example.com/w/api.php \
-e PARSOID_DOMAIN_localhost=http://localhost/w/api.php \
scwiki/parsoid:0.12.0
How to expose on a specific port: (You can use arbitrary port numbers which are not already in use)
# Expose port 8081
docker run -d -p 8081:8000 -e PARSOID_DOMAIN_localhost=http://localhost/w/api.php scwiki/parsoid:0.12.0
# Expose port 8142
docker run -d -p 8142:8000 -e PARSOID_DOMAIN_localhost=http://localhost/w/api.php scwiki/parsoid:0.12.0
PARSOID_DOMAIN_{domain}
defines URI and domain for the Parsoid service. The value of{domain}
should be the same as theMW_REST_DOMAIN
parameter in the MediaWiki web container. You can specify such variables multiple times (one for each domain the service should run for)PARSOID_NUM_WORKERS
defines the number of worker processes to the parsoid service. Set to0
to run everything in a single process without clustering. Usencpu
to run as many workers as there are CPU units.PARSOID_LOGGING_LEVEL
by defaultinfo
PARSOID_STRICT_SSL
by defaulttrue
[true
,false
]PARSOID_ENABLE_LINTER
by defaultfalse
[true
,false
] - Needed for Extension:DiscussionTools
For example, the environment variable PARSOID_DOMAIN_web=http://web/w/api.php
creates following section in the Parsoid configuration:
mwApis:
-
uri: 'http://web/w/api.php'
domain: 'web'
- pastakhov: Creator of the original code base.
- thenets: Maintainer of the second fork.
- muellermartin: Improved the documentation.
- endoodev1: Helped with Kubernetes compatibility.
- sepastian: Added support to
strictSSL
using container ENV.