This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
mediawiki/README.md

93 lines
3.2 KiB
Markdown
Raw Normal View History

2020-09-04 23:59:00 +00:00
# Mediawiki
2020-10-24 13:46:39 +00:00
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/mediawiki/status.svg)](https://drone.autonomic.zone/coop-cloud/mediawiki)
2020-10-05 23:34:57 +00:00
2020-10-24 13:46:39 +00:00
Mediawiki [version 1.35][mediawiki-1.35]
2020-09-04 23:59:00 +00:00
2020-09-07 23:38:20 +00:00
Requires Docker version 1.11.2 or above to run.
2020-09-04 23:59:00 +00:00
2020-10-24 13:46:39 +00:00
Based on [`mediawiki`][mediawiki].
2020-09-04 23:59:00 +00:00
2020-09-07 23:38:20 +00:00
1. Set up Docker Swarm and [`abra`][abra]
2020-10-24 13:46:39 +00:00
2. Deploy [`coop-cloud/traefik`][traefik]
3. `cp .envrc.sample .envrc`
4. Edit `.envrc` - be sure to change `$DOMAIN` to something that resolves to
2020-09-07 23:38:20 +00:00
your Docker swarm box
5. `direnv allow` (or `source .envrc`)
6. Generate secrets:
2020-09-19 10:09:49 +00:00
```
abra secret_generate db_password v1
abra secret_generate db_root_password v1
2020-09-22 18:12:24 +00:00
abra secret_generate mediawiki_secret_key v1 "pwgen -n 64 1"
2020-09-19 10:09:49 +00:00
```
2020-10-24 13:46:39 +00:00
7. `abra deploy`
8. Create an initial admin user:
2020-10-24 01:56:05 +00:00
`abra run app php /var/www/html/maintenance/createAndPromote.php --sysop YourUsername YourPassword`
2020-09-16 20:19:23 +00:00
2020-10-24 17:01:49 +00:00
## Email
1. Edit `.envrc` and uncomment the `SMTP` lines. Set `SMTP_HOST` to
`postfix_relay` for `coop-cloud/postfix_relay`, or `mailu_front` for
`coop-cloud/mailu` (assuming default stack names)
2. Make sure to add the domain to your email config `EXTRA_SENDER_DOMAINS` in
`postfix_relay`, or in Mailu: Admin » Domains » Add.
3. `direnv allow` (or `source .envrc`)
4. `abra deploy`
## Single Sign On
### SimpleSAMLphp
2020-09-16 20:19:23 +00:00
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
2020-09-22 18:12:24 +00:00
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:
```
2020-09-22 18:12:24 +00:00
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`:
```
2020-09-22 18:12:24 +00:00
abra run simplesaml vi /var/simplesamlphp/config/config.php
# find 'store.sql.dsn' and edit to:
# 'sqlite:/var/simplesamlphp/data/simplesamlphp.sq3'
```
2020-09-04 23:59:00 +00:00
2020-10-24 17:01:49 +00:00
### OpenID Connect
1. Edit `.envrc` and uncomment lines in the `OPENID` section (including `COMPOSE_FILE`)
2020-10-24 17:01:49 +00:00
2. `direnv allow`
3. Store your Keycloak-generated client secret in Docker:
```
abra secret insert openid_client_secret v1 put-your-secret-here
```
4. `abra deploy`
2020-09-04 23:59:00 +00:00
## License
MIT License
2020-09-07 23:38:20 +00:00
2020-10-24 13:46:39 +00:00
[mediawiki-1.35]: https://www.mediawiki.org/wiki/Release_notes/1.35
2020-09-07 23:38:20 +00:00
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
2020-10-24 13:46:39 +00:00
[traefik]: https://git.autonomic.zone/coop-cloud/traefik
[mediawiki]: https://hub.docker.com/_/mediawiki
[simplesamlphp]: https://simplesamlphp.org/
[mw-simplesamlphp]: https://www.mediawiki.org/wiki/Extension:SimpleSAMLphp
[venatorfox-simplesamlphp]: https://hub.docker.com/r/venatorfox/simplesamlphp