Loading...
 

Dockerize MediaWiki

I got the following deployment to work for me, which includes an https:// nginx proxy...

MySQL


docker container run -d --name mysql-pottersoc -v /mnt/docker/mediawiki/data/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=PASSWORD -e MYSQL_HOST="" mysql:5.6.35

Nginx SSL Proxy


docker run -d --name nginx-proxy -p 80:80 -p 443:443 -v /mnt/ssd/docker/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy

MediaWiki


docker run --name pottersoc-mediawiki -v /mnt/ssd/docker/mediawiki/data:/data:rw -d -e MEDIAWIKI_SITE_SERVER="https://mysite.com" -e MEDIAWIKI_SITE_NAME="PotterSoc Draft" -e MEDIAWIKI_ADMIN_PASS="PASSWORD" -e MEDIAWIKI_DB_HOST="172.17.0.2" -e MEDIAWIKI_DB_PORT=3306 -e MEDIAWIKI_DB_USER=root -e MEDIAWIKI_DB_PASSWORD="PASSWORD" -e MEDIAWIKI_DB_TYPE=mysql -e MEDIAWIKI_RESTBASE_URL=http://mediawiki-node-services.optiplex-760:7231/localhost/v1 -e VIRTUAL_HOST=mysite.com wikimedia/mediawiki

Make sure to put your SSL certs inside the the certs directory and change the paths according to your system paths.