Skip to content

Add database script for MediaWiki 1.43 #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/wbstack.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

'ui_url' => env('WBSTACK_UI_URL', 'https://wbstack.com'),

'wiki_db_provision_version' => env('WBSTACK_WIKI_DB_PROVISION_VERSION', 'mw1.39-wbs1'),
'wiki_db_use_version' => env('WBSTACK_WIKI_DB_USE_VERSION', 'mw1.39-wbs1'),
'wiki_db_provision_version' => env('WBSTACK_WIKI_DB_PROVISION_VERSION', 'mw1.43-wbs1'),
'wiki_db_use_version' => env('WBSTACK_WIKI_DB_USE_VERSION', 'mw1.43-wbs1'),
'wiki_hard_delete_threshold' => env('WBSTACK_HARD_DELETE_THRESHOLD', 30),
'wiki_max_per_user' => env('WBSTACK_MAX_PER_USER', false),

Expand Down
21 changes: 19 additions & 2 deletions database/mw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This directory contains the SQL needed to create and wiki DBs.

**Versions**

- mw1.43-wbs1 - First 1.43 install
- mw1.39-wbs1 - First 1.39 install
- mw1.38-wbs1 - First 1.38 install
- mw1.35-wbs1 - First 1.35 install
Expand All @@ -26,9 +27,25 @@ This directory contains the SQL needed to create and wiki DBs.
Make sure you have updated the docker-compose-clean.yml to:

- For adding extensions?
- Include the latest version of the Mediawiki image with the new code added but not loaded (for extensions)
- Update maintWikWiki.json to match the defaults needs to load all extension from the mw image


**Preparing the MediaWiki image:**

Checkout the [wbstack/mediawiki](https://github.com/wbstack/mediawiki) repository and navigate to it.

Remove any empty extension directories generated by the sync script. You can use the following command to help locate them if they exist:

```
git clean -nd
```

Build the image locally using:

```
docker build -t local-wbaas-mediawiki .
```

**Start the setup:**

```
Expand Down Expand Up @@ -62,7 +79,7 @@ cd ./w/extensions/ && ls -dm * | tr -d ' ' | tr -d \\n && cd ./../../

This is an example install command with `WikibaseEdtf` excluded:
```
WBS_DOMAIN=maint php ./w/maintenance/install.php --dbserver sql-clean --dbuser root --dbpass toor --dbname wiki --extensions AdvancedSearch,Auth_remoteuser,CirrusSearch,Cite,CodeEditor,CodeMirror,ConfirmAccount,ConfirmEdit,DeleteBatch,Echo,Elastica,EmbedVideo,EntitySchema,Gadgets,Graph,InviteSignup,JsonConfig,Kartographer,Mailgun,Math,MobileFrontend,MultimediaViewer,Nuke,OAuth,PageImages,ParserFunctions,Poem,Popups,RevisionSlider,Score,Scribunto,SecureLinkFixer,SpamBlacklist,StopForumSpam,SyntaxHighlight_GeSHi,TemplateData,TemplateSandbox,TextExtracts,Thanks,ThatSrc,TorBlock,TwoColConflict,UniversalLanguageSelector,WikiEditor,WikiHiero,Wikibase,WikibaseCirrusSearch,WikibaseExampleData,WikibaseInWikitext,WikibaseLexeme,WikibaseLexemeCirrusSearch,WikibaseManifest,cldr --pass AdminPass0 SiteName AdminName
WBS_DOMAIN=maint php ./w/maintenance/install.php --dbserver sql-clean --dbuser root --dbpass toor --dbname wiki --extensions AdvancedSearch,Auth_remoteuser,CirrusSearch,Cite,CodeEditor,CodeMirror,ConfirmAccount,ConfirmEdit,DeleteBatch,DismissableSiteNotice,Echo,Elastica,EmbedVideo,EntitySchema,Gadgets,InviteSignup,JsonConfig,Kartographer,Mailgun,Math,MobileFrontend,MultimediaViewer,Nuke,OAuth,PageImages,ParserFunctions,Poem,RevisionSlider,Score,Scribunto,SecureLinkFixer,SpamBlacklist,StopForumSpam,SyntaxHighlight_GeSHi,TemplateData,TemplateSandbox,TextExtracts,Thanks,ThatSrc,TorBlock,TwoColConflict,UniversalLanguageSelector,VisualEditor,WikiEditor,WikiHiero,Wikibase,WikibaseCirrusSearch,WikibaseExampleData,WikibaseInWikitext,WikibaseLexeme,WikibaseLexemeCirrusSearch,WikibaseManifest,cldr --pass AdminPass0 SiteName AdminName
```

**While** https://phabricator.wikimedia.org/T267809 is broken you'll then need to edit the auto generated LocalSettings.php file...
Expand Down
2 changes: 1 addition & 1 deletion database/mw/cleanSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// TODO allow passing in file? or run for all files?
$placeholder = '<<prefix>>_';
$filename = __DIR__.'/new/mw1.39-wbs1.sql';
$filename = __DIR__.'/new/mw1.43-wbs1.sql';

// Get the file
$text = file_get_contents($filename);
Expand Down
2 changes: 1 addition & 1 deletion database/mw/docker-compose-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.1'
services:

mediawiki:
image: ghcr.io/wbstack/mediawiki:1.39-7.4-20230328-0
image: local-wbaas-mediawiki
volumes:
- ./maintWikWiki.json:/var/www/html/w/maintWikWiki.json
- ./new:/var/www/html/w/maintenance/wbaas-api/new
Expand Down
Loading
Loading