# Mediawiki Mediawiki [version 1.32.1][mediawiki-1.32] Requires Docker version 1.11.2 or above to run. Based on [`mediawiki-ve-bundle`][mediawiki-ve]. 1. Set up Docker Swarm and [`abra`][abra] 2. Deploy [`compose-stacks/traefik`][compose-traefik] 2. `cp .envrc.sample .envrc` 3. Edit `.envrc` - be sure to change `$DOMAIN` to something that resolves to your Docker swarm box 4. `direnv allow` (or `. .envrc`) 5. Generate secrets: ``` abra secret_generate db_password v1 abra secret_generate db_root_password v1 abra secret_generate mediawiki_secret_key v1 "pwgen -n 64 1" ``` 6. `abra deploy` 7. `abra run mediawiki /bin/bash` to open a shell 8. `php /var/www/html/maintenance/createAndPromote.php YourUsername YourPassword` ## SimpleSAMLphp This app includes optional SAML Single Sign On using [SimpleSAMLphp][simplesamlphp] and Mediawiki's [Extension:SimpleSAMLphp][mw-simplesamlphp], based on the [`venatorfox/simplesamlphp`][venatorfox-simplesamlphp] image. NOTE: currently, if you enable SAML then it'll disable Mediawiki's own user account system. Patches to make this configurable are welcome! 1. Edit `.envrc` and uncomment lines in the `SAML` section (including `COMPOSE_FILE`) 2. `direnv allow` 3. Generate secrets: ``` abra secret_generate saml_admin_password v1 abra secret_generate saml_secret_salt v1 "pwgen -n 64 1" ``` 4. `abra deploy` 5. Copy your SimpleSAMLphp metadata and certificates to the container (assuming you have local `metadata` and `cert` folders: ``` abra cp metadata simplesaml:/var/simplesamlphp/ abra cp cert simplesaml:/var/simplesamlphp/ ``` 6. You can log into SimpleSAMLphp using the password you generated at https://$DOMAIN/simplesaml/ and test authentication 7. Edit SimpleSAMLphp's `config.php` and change `store.sql.dsn`: ``` abra run simplesaml vi /var/simplesamlphp/config/config.php # find 'store.sql.dsn' and edit to: # 'sqlite:/var/simplesamlphp/data/simplesamlphp.sq3' ``` ## License MIT License [mediawiki-1.32]: https://www.mediawiki.org/wiki/Release_notes/1.32.1 [abra]: https://git.autonomic.zone/autonomic-cooperative/abra [compose-traefik]: https://git.autonomic.zone/compose-stacks/traefik [mediawiki-ve]: https://hub.docker.com/r/revianlabs/mediawiki-ve-bundle [simplesamlphp]: https://simplesamlphp.org/ [mw-simplesamlphp]: https://www.mediawiki.org/wiki/Extension:SimpleSAMLphp [venatorfox-simplesamlphp]: https://hub.docker.com/r/venatorfox/simplesamlphp