Skip to content

microlancer/mediawiki-docker

Repository files navigation

mediawiki-docker

Docker file to run mediawiki

How to use

  1. Build the mediawiki_lightning image. Run sh build.sh.
  2. Start with docker-compose. Run sh start.sh.
  3. Initialize the container. Run sh init.sh.
  4. Visit http://127.0.0.1:8080 and the install steps should appear.
  5. When asked for the DB host, use the hostname database which will resolve to the IP address of the mysql container. Do not use localhost or 127.0.0.1 as they won't work. See the yml file for the other DB values.
  6. Also suggested: set to Account Creation Required, update Return email address, enable Parser hooks > ParserFunctions, Enable file uploads, No caching
  7. Copy the LocalSettings.php at the end of the setup into the ./html folder. For example, it might look like: cp ~/Downloads/LocalSetting.php ./html (depends where you downloaded it)
  8. Download/clone the LightningPayment extension into the ./html/extensions folder
  9. Copy the /etc/stunnel/stunnel.pem file from the lightning-php api server.
  10. Modify the /etc/stunnel/ln-gateway-client.conf file to use the correct ip of your lightning node php api.
  11. Run: sh start-stunnel.sh.
  12. (Optional) Go into the container with sh root.sh and check the /var/log/stunnel4/stunnel.log for any errors.
  13. (Optional) Also validate the lightning node connection within the container: curl -v http://ln-gateway:3000/?method=getinfo should return node information.
  14. Create a template page LightningPayment with the contents of Template.txt - You can do this by editing: http://127.0.0.1:8080/index.php?title=Template:LightningPayment&action=edit
  15. Browse to http://127.0.0.1:8080/index.php/Special:LightningPayment to check that the extension and template are working.
  16. You may need to reconfigure exim4 to ensure mail is working.
  17. To stop: sh stop.sh

Add these settings to the bottom of the LocalSettings.php file:

wfLoadExtension( 'ParserFunctions' );
include("extensions/LightningPayment/LightningPayment.php");

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['trusted']['edit'] = true;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['user']['createpage'] = false;
$wgGroupPermissions['trusted']['createpage'] = true;

$wgLightningPaymentNodeUrl = 'http://ln-gateway:3000';
#$wgMainCacheType = CACHE_NONE;
#$wgCacheDirectory = false;
#$wgShowExceptionDetails = true;

$wgUrlProtocols[] = 'lightning:';

$wgAllowImageTag = true;
$wgAllowExternalImagesFrom = ['https://chart.googleapis.com/'];

About

Docker file to run mediawiki

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages