Skip to content
Merged
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) pull request for the new version of MediaWiki you want to build the sql file for 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,CirrusSearch,Cite,CodeEditor,CodeMirror,ConfirmAccount,ConfirmEdit,DeleteBatch,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,WikibaseInWikitext,WikibaseLexeme,WikibaseLexemeCirrusSearch,WikibaseManifest,cldr --pass AdminPass0 SiteName AdminName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come these extensions are removed and added? I think we should probably document the reasoning somewhere ™️ for future reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have separate commits for extensions that are added or removed.

wbstack/mediawiki#453 - remove Graph
wbstack/mediawiki#367 - remove Popups
wbstack/mediawiki#455 - add VisualEditor
wbstack/mediawiki@e2e48b8 - remove WikibaseExampleData and Auth_remoteuser

```

**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
@@ -1,7 +1,7 @@
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