User:DWalden (WMF)/Wiki family

Setup
The below steps should create:
 * a "regular" wiki on http://enwiki.localhost:8080 which users will interact with
 * a "login" wiki on http://loginwiki.localhost:8080 which users will not directly interact with but which will deal with centrally creating and logging in users

Some problems:
 * Logins often won't work. I don't know why. Just keep retrying until they do. This problem seems to have sorted itself out.
 * I don't know if the job runner will work properly. This works as long as you run the appropriate commands in at the bottom of the page.
 * I think it might be accessing the database as a root user.

Clone all the necessary repos:

Create a  with this in it:

Create  file:

In the mediawiki core repo, run these commands to start the docker container and install PHP libraries:

Run this command to access the database:

Run these SQL commands to create the databases:

Exit the database and run these commands:

Run this command:

Add this to the end of :

Run these commands:

It should now all be setup. Go to http://enwiki.localhost:8080/wiki/Main_Page.

Adding a new wiki
Create a new database for the wiki. Run this command to access the database:

Run these SQL commands to create the databases:

Add the new wiki's database name to  in.

(Optional) Add the wiki database name to the script in.

Access the new wiki via http:// .localhost:8080.

Having a different configuration per wiki
If you want to add specific configuration options that are only for certain wikis, add something like this to you :

You could also potentially do some of this with Manual:$wgConf.

Recommended way of starting the wiki family
Recommended way of updating all the code, installing php dependencies, updating databases and starting this family of wikis. You can save this to a file locally and run like  or you can copy and paste this into your terminal. Should be ran from the mediawiki core repository: