Docker file to run mediawiki
- Build the mediawiki_lightning image. Run
sh build.sh
. - Start with docker-compose. Run
sh start.sh
. - Initialize the container. Run
sh init.sh
. - Visit http://127.0.0.1:8080 and the install steps should appear.
- 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. - Also suggested: set to Account Creation Required, update Return email address, enable Parser hooks > ParserFunctions, Enable file uploads, No caching
- 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) - Download/clone the
LightningPayment
extension into the ./html/extensions folder - Copy the
/etc/stunnel/stunnel.pem
file from the lightning-php api server. - Modify the
/etc/stunnel/ln-gateway-client.conf
file to use the correct ip of your lightning node php api. - Run:
sh start-stunnel.sh
. - (Optional) Go into the container with
sh root.sh
and check the /var/log/stunnel4/stunnel.log for any errors. - (Optional) Also validate the lightning node connection within the container:
curl -v http://ln-gateway:3000/?method=getinfo
should return node information. - 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
- Browse to http://127.0.0.1:8080/index.php/Special:LightningPayment to check that the extension and template are working.
- You may need to reconfigure exim4 to ensure mail is working.
- 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/'];