23 Commits

Author SHA1 Message Date
3wc
e6f77b37e6 Fix new deployments?
Some checks failed
continuous-integration/drone/pr Build is failing
Re: #33
2023-06-25 21:17:02 +01:00
3wc
260dd4d7f3 chore: publish 2.3.0+1.39.3 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-22 11:03:36 +01:00
57cf8db271 Merge pull request 'Add support for SemanticMediaWiki, MobileFrontend, MsUpload, PageForms, PageSchemas, WikiMarkdown, Tweeki' (#31) from flancian/wiki.social.coop:main into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #31
2023-05-30 23:00:40 +00:00
0c50c3398f Use tabs ;)
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-30 23:50:22 +02:00
e2ca6b6df4 Add MobileFrontend support and fix issues spotted during PR review :D
Some checks failed
continuous-integration/drone/pr Build is failing
#31
2023-05-30 23:46:40 +02:00
b78c20fe41 Disable Tweeki skin by default as it's a bit opinionated/non-standard.
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-28 15:21:12 +02:00
112bd3300f Disable parsoid, it's no longer needed.
Some checks failed
continuous-integration/drone/pr Build is failing
This applies changes from #32 independently; I believe the result should be a clean merge.
2023-05-28 15:19:13 +02:00
cc3682ef89 Merge branch 'main' into main
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-15 17:44:27 +00:00
b1d3e2a0f9 Add Tweeki to sample.
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-15 01:11:37 +02:00
7ca11b8bc9 Add Tweeki skin as option. 2023-05-15 01:10:00 +02:00
3wc
e8fc7e6532 chore: publish 2.2.3+1.39.3 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-12 22:47:47 +01:00
381a3ee2d6 Merge pull request 'Chore: Bump mediawiki to version 1.39.3.' (#30) from samwightt/mediawiki:main into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #30
2023-05-12 21:46:57 +00:00
f2afce4145 Chore: Bump mediawiki to version 1.39.3.
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-12 10:24:28 -05:00
a931c54b31 Make MEDIAWIKI_DEBUG also control level of PHP warnings shown. 2023-05-08 22:32:54 +02:00
3101cff3e8 SemanticMediaWiki now works -- after installing with composer :) 2023-05-08 22:25:52 +02:00
2dd1c7aeee Fix example OpenID URL; keycloak doesn't expect /auth/ here it seems. 2023-04-01 22:39:09 +02:00
f509f7b830 Bump LocalSettings and Entrypoint versions. 2023-04-01 22:32:30 +02:00
ff2d004bcf Add LocalSettings changes for the extensions in the previous commit. 2023-04-01 21:53:04 +02:00
917eb68ae7 First stab at adding extensions:
- MsUpload
- PageForms
- PageSchemas
- SemanticMediaWiki
- WikiMarkdown
2023-04-01 21:09:11 +02:00
3wc
2ad502e4fa Fix build status URL, drop redundant version
[ci skip]
2023-03-28 11:32:38 -04:00
3wc
9ee106a2ed chore: publish 2.2.2+1.39.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 11:08:31 -04:00
bce93ab727 Merge pull request 'Update LocalSettings.php.tmpl to match new configuration syntax.' (#29) from flancian/wiki.social.coop:main into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #29
2023-03-28 14:36:47 +00:00
8c503d5d28 Update LocalSettings.php.tmpl to match new configuration syntax.
Some checks failed
continuous-integration/drone/pr Build is failing
This syntax follows that at
https://www.mediawiki.org/wiki/Extension:OpenID_Connect.
2023-03-28 12:13:12 +02:00
8 changed files with 148 additions and 48 deletions

View File

@ -42,6 +42,31 @@ SECRET_MEDIAWIKI_SECRET_KEY_VERSION=v1 # length=64
## OpenID Connect
# OPENID_ENABLED=1
# COMPOSE_FILE="compose.yml:compose.openid.yml"
# OPENID_KEYCLOAK_URL="https://keycloak.local:8080/auth/realms/acme/"
# OPENID_KEYCLOAK_URL="https://keycloak.local:8080/realms/acme/"
# OPENID_CLIENT_ID="mediawiki"
# SECRET_OPENID_CLIENT_SECRET_VERSION=v1
## WikiMarkdown
#MARKDOWN_ENABLED=1
## MobileFrontend
#MOBILEFRONTEND_ENABLED=1
## MsUpload
#MSU_ENABLED=1
## PageForms
#PAGEFORMS_ENABLED=1
## PageSchemas
#PAGESCHEMAS_ENABLED=1
## SemanticMediaWiki
#SEMANTICMW_ENABLED=1
## WikiMarkdown
#MARKDOWN_ENABLED=1
## Tweeki skin
#TWEEKI_ENABLED=0

View File

@ -5,7 +5,6 @@ if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
@ -116,15 +115,27 @@ $wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['read'] = true;
{{ end }}
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' );
wfLoadSkin( 'MinervaNeue' );
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
{{ if eq (env "TWEEKI_ENABLED") "1" }}
wfLoadSkin( 'Tweeki' );
$wgDefaultSkin = "tweeki";
{{ else }}
$wgDefaultSkin = "vector";
{{ end }}
{{ if eq (env "MOBILEFRONTEND_ENABLED") "1" }}
wfLoadExtension( 'MobileFrontend' );
$wgDefaultMobileSkin = 'minerva';
{{ end }}
# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtensions('ExtensionName');
@ -143,23 +154,6 @@ $wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgVisualEditorAllowLossySwitching = false;
$wgVirtualRestConfig['modules']['parsoid'] = [
// URL to the Parsoid instance - use port 8142 if you use the Debian package - the parameter 'URL' was first used but is now deprecated (string)
'url' => 'http://parsoid:8000/',
// Parsoid "domain" (string, optional) - MediaWiki >= 1.26
'domain' => 'localhost',
// Parsoid "prefix" (string, optional) - deprecated since MediaWiki 1.26, use 'domain'
'prefix' => 'localhost',
// Forward cookies in the case of private wikis (string or false, optional)
'forwardCookies' => true,
// request timeout in seconds (integer or null, optional)
'timeout' => null,
// Parsoid HTTP proxy (string or null, optional)
'HTTPProxy' => null,
// whether to parse URL as if they were meant for RESTBase (boolean or null, optional)
'restbaseCompat' => null,
];
{{ if eq (env "SAML_ENABLED") "1" }}
wfLoadExtension( 'PluggableAuth' );
@ -191,9 +185,13 @@ $wgDebugToolbar = true;
wfLoadExtension( 'PluggableAuth' );
wfLoadExtension( 'OpenIDConnect' );
$wgOpenIDConnect_Config['{{ env "OPENID_KEYCLOAK_URL" }}'] = [
'clientID' => '{{ env "OPENID_CLIENT_ID"}}',
'clientsecret' => '{{ secret "openid_client_secret" }}'
$wgPluggableAuth_Config[] = [
'plugin' => 'OpenIDConnect',
'data' => [
'providerURL' => '{{ env "OPENID_KEYCLOAK_URL" }}',
'clientID' => '{{ env "OPENID_CLIENT_ID"}}',
'clientsecret' => '{{ secret "openid_client_secret" }}'
]
];
$wgGroupPermissions['*']['autocreateaccount'] = true;
@ -210,6 +208,30 @@ $wgSMTP = [
];
{{ end }}
{{ if eq (env "MSU_ENABLED") "1" }}
wfLoadExtension( 'MsUpload' );
$wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.)
{{ end }}
{{ if eq (env "PAGEFORMS_ENABLED") "1" }}
wfLoadExtension( 'PageForms' );
{{ end }}
{{ if eq (env "PAGESCHEMAS_ENABLED") "1" }}
wfLoadExtension( 'PageSchemas' );
{{ end }}
{{ if eq (env "SEMANTICMW_ENABLED") "1" }}
wfLoadExtension( 'SemanticMediaWiki' );
enableSemantics( '{{ env "DOMAIN" }}' );
{{ end }}
{{ if eq (env "MARKDOWN_ENABLED") "1" }}
wfLoadExtension( 'WikiMarkdown' );
$wgAllowMarkdownExtra = true; // allows usage of Parsedown Extra
$wgAllowMarkdownExtended = true; // allows usage of Parsedown Extended
{{ end }}
$wgFileExtensions = array(
'png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'mpp', 'pdf', 'ppt', 'tiff',
'bmp', 'docx', 'xlsx', 'pptx', 'ps', 'odt', 'ods', 'odp', 'odg'

View File

@ -1,8 +1,6 @@
# Mediawiki
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/mediawiki/status.svg)](https://drone.autonomic.zone/coop-cloud/mediawiki)
Mediawiki [version 1.35][mediawiki-1.35]
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/mediawiki/status.svg)](https://build.coopcloud.tech/coop-cloud/mediawiki)
<!-- metadata -->
* **Category**: Apps

View File

@ -1,8 +1,8 @@
export LOCAL_SETTINGS_CONF_VERSION=v5
export LOCAL_SETTINGS_CONF_VERSION=v20
export HTACCESS_CONF_VERSION=v1
export ENTRYPOINT_CONF_VERSION=v3
export COMPOSER_LOCAL_CONF_VERSION=v1
export PHP_INI_VERSION=v1
export ENTRYPOINT_CONF_VERSION=v20
export COMPOSER_LOCAL_CONF_VERSION=v5
export PHP_INI_VERSION=v4
export SAML_ENTRYPOINT_CONF_VERSION=v3

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: mediawiki:1.39.1
image: mediawiki:1.39.3
environment:
- DOMAIN
- STACK_NAME
@ -45,7 +45,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "coop-cloud.${STACK_NAME}.version=2.2.1+1.39.1"
- "coop-cloud.${STACK_NAME}.version=2.3.0+1.39.3"
entrypoint: /docker-entrypoint2.sh
db:
@ -63,14 +63,6 @@ services:
networks:
- internal
parsoid:
image: thenets/parsoid:0.11.0
hostname: parsoidserver
networks:
- internal
environment:
PARSOID_DOMAIN_localhost: http://app:80/api.php
volumes:
mariadb:
mediawiki_images:

View File

@ -1,4 +1,9 @@
{
{{ if eq (env "SEMANTICMW_ENABLED") "1" }}
"require": {
"mediawiki/semantic-media-wiki": "^4.1.0"
},
{{ end }}
"extra": {
"merge-plugin": {
"include": [

View File

@ -40,16 +40,13 @@ init_db() {
php /var/www/html/maintenance/sql.php /var/www/html/maintenance/tables.sql
php /var/www/html/maintenance/sql.php /var/www/html/maintenance/interwiki.sql
# FIXME run createAndPromote.php with $ADMIN_USERNAME
else
php /var/www/html/maintenance/update.php --quick
fi
if [ -n "${OPENID_ENABLED-}" ]; then
php /var/www/html/maintenance/update.php --quick
fi
php /var/www/html/maintenance/update.php --quick
}
init_extensions() {
if [ ! -d /var/www/html/extensions/PluggableAuth ]; then
git clone --depth 1 -b REL1_39 \
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PluggableAuth \
@ -71,12 +68,67 @@ init_extensions() {
/var/www/html/extensions/OpenIDConnect
fi
fi
if [ -n "${MOBILEFRONTEND_ENABLED-}" ]; then
if [ ! -d /var/www/html/extensions/MobileFrontend ]; then
git clone --depth 1 -b REL1_39 \
https://github.com/wikimedia/mediawiki-extensions-MobileFrontend.git \
/var/www/html/extensions/MobileFrontend
fi
fi
if [ -n "${MSU_ENABLED-}" ]; then
if [ ! -d /var/www/html/extensions/MsUpload ]; then
git clone --depth 1 -b REL1_39 \
https://gerrit.wikimedia.org/r/mediawiki/extensions/MsUpload \
/var/www/html/extensions/MsUpload
fi
fi
if [ -n "${PAGEFORMS_ENABLED-}" ]; then
if [ ! -d /var/www/html/extensions/PageForms ]; then
git clone --depth 1 -b REL1_39 \
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageForms \
/var/www/html/extensions/PageForms
fi
fi
if [ -n "${PAGESCHEMAS_ENABLED-}" ]; then
if [ ! -d /var/www/html/extensions/PageSchemas ]; then
git clone --depth 1 -b REL1_39 \
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageSchemas \
/var/www/html/extensions/PageSchemas
fi
fi
if [ -n "${MARKDOWN_ENABLED-}" ]; then
if [ ! -d /var/www/html/extensions/WikiMarkdown ]; then
git clone --depth 1 \
https://github.com/kuenzign/WikiMarkdown \
/var/www/html/extensions/WikiMarkdown
fi
fi
}
init_skins() {
if [ -n "${TWEEKI_ENABLED-}" ]; then
if [ ! -d /var/www/html/skins/Tweeki ]; then
git clone --depth 1 \
https://github.com/thaider/Tweeki \
/var/www/html/skins/Tweeki
fi
fi
}
main() {
set -eu
init_extensions
init_skins
init_composer
composer_install
init_db

View File

@ -2,3 +2,9 @@ upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 7200
max_file_uploads = 1000
{{ if eq (env "MEDIAWIKI_DEBUG") "0" }}
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
{{ else }}
error_reporting = E_ALL
{{ end }}