Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1:  
[[Category:Software]]
 
[[Category:Software]]
 
= Docker MediaWiki Server =
 
= Docker MediaWiki Server =
   
Notes and configuration files for setting up MediaWiki with nginx-proxy for Let's Encrypt SSL certs.
 
Notes and configuration files for setting up MediaWiki with nginx-proxy for Let's Encrypt SSL certs.
   Line 11: Line 10:     
== nginx-proxy ==
 
== nginx-proxy ==
   
* Create '''/srv/nginx-proxy'''
 
* Create '''/srv/nginx-proxy'''
 
* Add this file
 
* Add this file
Line 57: Line 55:     
== MediaWiki ==
 
== MediaWiki ==
   
* Create /srv/wiki, /srv/wiki/build, /srv/wiki/build/extensions
 
* Create /srv/wiki, /srv/wiki/build, /srv/wiki/build/extensions
 
* Add the following files
 
* Add the following files
    
=== docker-compose.yml ===
 
=== docker-compose.yml ===
   
Copy the following to '''/srv/wiki/docker-compose.yml'''
 
Copy the following to '''/srv/wiki/docker-compose.yml'''
   Line 75: Line 71:  
           - parsoid
 
           - parsoid
 
         restart: always
 
         restart: always
        #ports:
  −
        #  - 80:80
   
         environment:
 
         environment:
 
           ## TODO: CHANGE VIRTUAL_HOST, LETSENCRYPT_HOST, and LETSENCRYPT_EMAIL TO YOUR OWN
 
           ## TODO: CHANGE VIRTUAL_HOST, LETSENCRYPT_HOST, and LETSENCRYPT_EMAIL TO YOUR OWN
Line 87: Line 81:  
         volumes:
 
         volumes:
 
           - /srv/wiki/html/images:/var/www/html/images
 
           - /srv/wiki/html/images:/var/www/html/images
 +
          ## TODO: remove the # below AFTER you have downloaded the LocalSettings.php file
 
           #- /srv/wiki/LocalSettings.php:/var/www/html/LocalSettings.php
 
           #- /srv/wiki/LocalSettings.php:/var/www/html/LocalSettings.php
 
         networks:
 
         networks:
Line 109: Line 104:  
      
 
      
 
       parsoid:
 
       parsoid:
    #    image: pastakhov/parsoid:0.7.1
   
         image: thenets/parsoid:0.10
 
         image: thenets/parsoid:0.10
 
         container_name: parsoid
 
         container_name: parsoid
Line 125: Line 119:     
=== Dockerfile ===
 
=== Dockerfile ===
 +
There are two ways to create the Dockerfile for MediaWiki. 
 +
 +
* simple uses the MediaWiki image and adds your extension(s) to it.
 +
* advanced builds the MediaWiki image from scratch and adds your extension(s) to it.
 +
 +
For most users, the simple version of the Dockerfile will suffice.
 +
 +
Extract all extensions to the '''/srv/wiki/build/extensions''' directory. 
    
==== Simple ====
 
==== Simple ====
   
Copy the following to '''/srv/wiki/build/Dockerfile'''
 
Copy the following to '''/srv/wiki/build/Dockerfile'''
   Line 269: Line 270:     
=== Database connection details ===
 
=== Database connection details ===
   
When prompted for the database enter '''db://localhost'''
 
When prompted for the database enter '''db://localhost'''
    
=== LocalSettings File ===
 
=== LocalSettings File ===
   
* Download when prompted
 
* Download when prompted
 
* Stop the wiki with '''''docker-compose down'''''
 
* Stop the wiki with '''''docker-compose down'''''
Line 283: Line 282:     
== Misc ==
 
== Misc ==
 +
=== Preventing access ===
 +
Note:  You can also choose an access level at initial installation.
   −
=== Preventing access ===
   
https://www.mediawiki.org/wiki/Manual:Preventing_access#Simple_private_wiki
 
https://www.mediawiki.org/wiki/Manual:Preventing_access#Simple_private_wiki
 
=== Upgrading ===
 
=== Upgrading ===
# Update in '''/srv/wiki/build/Dockerfile'''
+
IMPORTANT:  Read https://www.mediawiki.org/wiki/Manual:Upgrading first for information about upgrading.
 +
 
 +
# Update '''/srv/wiki/build/Dockerfile'''.  Either update version (simple) or make sure Dockerfile has the required dependencies and update version (advanced).
 
# Run '''''docker-compose build'''''  
 
# Run '''''docker-compose build'''''  
   Line 294: Line 296:  
# Run '''''docker-compose up -d'''''
 
# Run '''''docker-compose up -d'''''
 
# Run '''''docker-compose exec web bash'''''
 
# Run '''''docker-compose exec web bash'''''
# '''''cd maintenance'''''
+
# Run '''''cd maintenance'''''
# '''''php update.php'''''
+
# Run '''''php update.php'''''
 
  −
For more information: https://www.mediawiki.org/wiki/Manual:Upgrading
 

Navigation menu