thenets / docker-parsoid

Containerized MediaWiki parsoid service
MIT License
21 stars 17 forks source link
docker mediawiki mediawiki-extension parsoid

MediaWiki Parsoid with Docker

Docker Pulls Build Status

This repo contains a Docker image to run the Parsoid application. See the full Parsoid/Setup documentation for help.

Versions available

thenets/parsoid:0.8, thenets/parsoid:0.9, thenets/parsoid:0.10, thenets/parsoid:0.11

What Is Included?

How to deploy

To start Parsoid run the command below. Just pay attention to the MediaWiki version and choose a compatible Parsoid version.

# For MediaWiki <= 1.30
docker run -d -p 8080:8000 -e PARSOID_DOMAIN_localhost=http://localhost/w/api.php thenets/parsoid:0.8

# For MediaWiki >= 1.31 & <= 1.32
docker run -d -p 8080:8000 -e PARSOID_DOMAIN_localhost=http://localhost/w/api.php thenets/parsoid:0.10

# For MediaWiki >= 1.33
docker run -d -p 8080:8000 -e PARSOID_DOMAIN_localhost=http://localhost/w/api.php thenets/parsoid:0.11

Examples

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 \
            thenets/parsoid:0.11

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 thenets/parsoid:0.11

# Expose port 8142
docker run -d -p 8142:8000 -e PARSOID_DOMAIN_localhost=http://localhost/w/api.php thenets/parsoid:0.11

Settings (ENV vars)

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'

Thanks