diff --git a/docker-compose.yml b/docker-compose.yml index dd4247e..1ef1535 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ version: '3' services: mediawiki: - image: mediawiki:lts + build: . restart: always ports: - 8090:80 diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..5ba553e --- /dev/null +++ b/dockerfile @@ -0,0 +1,14 @@ +FROM mediawiki:lts + +RUN apt update && apt install -y xpdf + +# Eventually you need tu build ghostscript from source + +RUN apt install -y ghostscript + +# Eventually you need tu build Imagick from source + +RUN apt install -y imagemagick + +# Start from the webserver neccessary or not? Test from 23.04.2021 -> not needed +#CMD ["apache2-foreground"] \ No newline at end of file diff --git a/example.LocalSettings.php b/example.LocalSettings.php index 24221ed..e22ed84 100644 --- a/example.LocalSettings.php +++ b/example.LocalSettings.php @@ -109,10 +109,16 @@ $wgMemCachedServers = []; ## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: +$wgEnableWriteAPI = true; // Enable the API $wgEnableUploads = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert"; +$wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.) +$wgGroupPermissions['user']['upload'] = true; // Allow regular users to upload files +// Make sure that the file types you want to upload are allowed: +$wgFileExtensions = [ 'png','gif','jpg','jpeg','doc','xls','pdf','ppt','tiff','bmp','docx','xlsx','pptx' ]; + # InstantCommons allows wiki to use images from https://commons.wikimedia.org $wgUseInstantCommons = true; @@ -207,10 +213,38 @@ wfLoadExtension( 'WikiEditor' ); # End of automatically generated settings. + # Add more configuration options below. +####################################### #wfLoadExtension( 'ClipUpload' ); require_once "$IP/extensions/ClipUpload/ClipUpload.php"; $wgClipUP_Comment = "Discription goes here..."; -$wgClipUP_MaxFileSize = "10000"; \ No newline at end of file +$wgClipUP_MaxFileSize = "10000"; + +# MSUpload Extension +#################### +wfLoadExtension( 'MsUpload' ); +# Options +$wgMSU_useDragDrop = true; // Should the drag & drop area be shown? (Not set by default) +$wgMSU_showAutoCat = true; // Files uploaded while editing a category page will be added to that category +$wgMSU_checkAutoCat = true; // Whether the checkbox for adding a category to a page is checked by default +$wgMSU_useMsLinks = false; // Insert links in Extension:MsLinks style? +$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox +$wgMSU_imgParams = 'thumb|none'; // Any image parameter(s), delimited by pipes, e.g., {width}px, left, right, center, none, border, frameless, frame, thumb etc. + +# PdfHandler Extension +###################### +wfLoadExtension( 'PdfHandler' ); +# Options +$wgPdfProcessor = '/usr/bin/gs'; +#$wgPdfPostProcessor = $wgImageMagickConvertCommand; // if defined via ImageMagick +$wgPdfPostProcessor = '/usr/bin/convert'; // if not defined via ImageMagick +$wgPdfInfo = '/usr/bin/pdfinfo'; +$wgPdftoText = '/usr/bin/pdftotext'; +#$wgGenerateThumbnailOnParse = true; // Could make Thumbnail creation if there are problems + +# Allow External Images from my own servers +$wgAllowExternalImages = true; +$wgAllowExternalImagesFrom = [ 'http://127.0.0.1/', 'https://cloud.rd13server.de/' ]; // MediaWiki 1.14+ \ No newline at end of file