mirror of
https://github.com/siemens-mobile-hacks/siepatchwiki.git
synced 2026-11-25 23:57:17 +00:00
Set up editor and image upload
This commit is contained in:
parent
fd122d4ea9
commit
1bc2bfcafb
5 changed files with 43 additions and 11 deletions
|
|
@ -112,7 +112,7 @@ $wgMemCachedServers = [];
|
|||
|
||||
## To enable image uploads, make sure the 'images' directory
|
||||
## is writable, then set this to true:
|
||||
$wgEnableUploads = false;
|
||||
$wgEnableUploads = true;
|
||||
#$wgUseImageMagick = true;
|
||||
#$wgImageMagickConvertCommand = "/usr/bin/convert";
|
||||
|
||||
|
|
@ -157,33 +157,37 @@ $wgDiff3 = "/usr/bin/diff3";
|
|||
|
||||
## Default skin: you can change the default skin. Use the internal symbolic
|
||||
## names, e.g. 'vector' or 'monobook':
|
||||
$wgDefaultSkin = "minerva";
|
||||
//$wgDefaultSkin = "minerva";
|
||||
$wgDefaultSkin = "MonoBook";
|
||||
|
||||
# Enabled skins.
|
||||
# The following skins were automatically enabled:
|
||||
wfLoadSkin( 'MinervaNeue' );
|
||||
//wfLoadSkin( 'MinervaNeue' );
|
||||
wfLoadSkin( 'MonoBook' );
|
||||
wfLoadSkin( 'Timeless' );
|
||||
wfLoadSkin( 'Vector' );
|
||||
//wfLoadSkin( 'Timeless' );
|
||||
//wfLoadSkin( 'Vector' );
|
||||
|
||||
|
||||
# End of automatically generated settings.
|
||||
# Add more configuration options below.
|
||||
|
||||
wfLoadExtension( 'VisualEditor' );
|
||||
$wgGroupPermissions['user']['writeapi'] = true;
|
||||
wfLoadExtension( 'WikiEditor' );
|
||||
$wgGroupPermissions['*']['writeapi'] = true;
|
||||
//wfLoadExtension( 'WikiEditor' );
|
||||
//wfLoadExtension( 'DiscussionTools' );
|
||||
// Optional: Set VisualEditor as the default editor for anonymous users
|
||||
// otherwise they will have to switch to VE
|
||||
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
|
||||
|
||||
$wgDefaultUserOptions['visualeditor-enable'] = 1;
|
||||
// Optional: Don't allow users to disable it
|
||||
$wgHiddenPrefs[] = 'visualeditor-enable';
|
||||
|
||||
// Optional: Enable VisualEditor's experimental code features
|
||||
$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
|
||||
//$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
|
||||
|
||||
// Activate ONLY the 2017 wikitext editor by default
|
||||
$wgDefaultUserOptions['visualeditor-autodisable'] = true;
|
||||
$wgDefaultUserOptions['visualeditor-autodisable'] = false;
|
||||
$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;
|
||||
|
||||
wfLoadExtension( 'OOJSPlus' );
|
||||
wfLoadExtension( 'EnhancedUpload' );
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ services:
|
|||
- ./mediawiki:/app
|
||||
- ./data/images:/app/images
|
||||
- ./data:/data
|
||||
- ./scripts:/scripts
|
||||
restart: always
|
||||
networks:
|
||||
default:
|
||||
|
|
|
|||
10
init.sh
10
init.sh
|
|
@ -6,6 +6,10 @@ if [ -d mediawiki ]; then
|
|||
mkdir mediawiki|| (echo "Failed to create \"mediawiki\" directory" && exit 1)
|
||||
curl https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.0.tar.gz -o /tmp/mediawiki-1.43.0.tar.gz || (echo "Failed to download mediawiki" && exit 1)
|
||||
tar -xvf /tmp/mediawiki-1.43.0.tar.gz -C ./mediawiki --strip-components=1 || (echo "Failed to extract mediawiki" && exit 1)
|
||||
cd mediawiki/extensions
|
||||
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/OOJSPlus
|
||||
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/EnhancedUpload
|
||||
cd ../..
|
||||
fi
|
||||
set -a && source .env && set +a
|
||||
cp LocalSettings.php mediawiki/
|
||||
|
|
@ -18,5 +22,11 @@ fi
|
|||
sed -i "s,http://siepatchwiki\.test,${PREFIX}://${ESCAPED_VIRTUAL_HOST},g" mediawiki/LocalSettings.php
|
||||
mkdir -p data/deleted-files
|
||||
mkdir -p data/images
|
||||
chmod -R 777 data/images || true
|
||||
chmod -R 777 data || true
|
||||
docker-compose build
|
||||
docker-compose up -d
|
||||
docker-compose exec php-fpm chmod 777 /data/images
|
||||
docker-compose exec php-fpm /scripts/composer-install.sh
|
||||
docker-compose exec php-fpm sh -c "cd /app/extensions/OOJSPlus && /app/composer.phar install"
|
||||
docker-compose exec php-fpm sh -c "cd /app/extensions/EnhancedUpload && /app/composer.phar install"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
FROM php:8.3-fpm-alpine3.20
|
||||
RUN apk add php83-sqlite3 git diffutils
|
||||
RUN mkdir /data && chmod 777 /data
|
||||
RUN mkdir -p /data/images && chmod 777 /data && chmod 777 /data/images
|
||||
RUN set -ex \
|
||||
&& apk --no-cache add icu-dev libjpeg-turbo-dev libpng-dev freetype-dev zlib-dev \
|
||||
&& apk --no-cache add --virtual .build-deps $PHPIZE_DEPS \
|
||||
|
|
|
|||
17
scripts/composer-install.sh
Executable file
17
scripts/composer-install.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
cd /app || exit 1
|
||||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
||||
|
||||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
|
||||
then
|
||||
>&2 echo 'ERROR: Invalid installer checksum'
|
||||
rm composer-setup.php
|
||||
exit 1
|
||||
fi
|
||||
|
||||
php composer-setup.php --quiet
|
||||
RESULT=$?
|
||||
rm composer-setup.php
|
||||
exit $RESULT
|
||||
Loading…
Add table
Reference in a new issue