Added .gitignore and switched to docker-compose with bind mounts for data persistance and changed file upload limit to 100MB

This commit is contained in:
conradschulz 2021-01-02 10:03:34 +01:00
parent 57eb89083f
commit 3d89660561
6 changed files with 54 additions and 10 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
## Directories to ignore
mdbdata/
wikidata/

33
docker-compose.yml Normal file
View file

@ -0,0 +1,33 @@
# MediaWiki with MariaDB
#
# Access via "http://localhost:8080"
# (or "http://$(docker-machine ip):8080" if using docker-machine)
version: '3'
services:
mediawiki:
image: mediawiki:lts
restart: always
ports:
- 8090:80
links:
- database
volumes:
- ./wikidata/images:/var/www/html/images
- ./wikidata/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro
- ./wikidata/IMG_3131.png:/var/www/html/resources/assets/IMG_3131.png
#- ./wikidata/extensions:/var/www/html/extensions
# After initial setup, download LocalSettings.php to the same directory as
# this yaml and uncomment the following line and use compose to restart
# the mediawiki service
- ./wikidata/LocalSettings.php:/var/www/html/LocalSettings.php
database:
image: mariadb
restart: always
environment:
# @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
MYSQL_DATABASE: rd13mediawikidb
MYSQL_USER: wikiuser
MYSQL_PASSWORD: mwdbpw
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
volumes:
- ./mdbdata:/var/lib/mysql

View file

@ -19,7 +19,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "CoLa-Wiki";
$wgSitename = "CoLa-Wissensdatenbank";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
@ -36,7 +36,7 @@ $wgResourceBasePath = $wgScriptPath;
## The URL paths to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/wiki.png" ];
$wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/IMG_3131.png" ];
## UPO means: this is also a user preference option
@ -52,10 +52,10 @@ $wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "10.0.5.6";
$wgDBname = "rd13_mediawiki";
$wgDBserver = "database";
$wgDBname = "rd13mediawikidb";
$wgDBuser = "wikiuser";
$wgDBpassword = "rd13mediawikidbpw";
$wgDBpassword = "mwdbpw";
# MySQL specific settings
$wgDBprefix = "";
@ -101,14 +101,14 @@ $wgShellLocale = "C.UTF-8";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "de";
$wgSecretKey = "492d8002caa0078d866663a42bce5b38acc1825e4c7596106ec62c97ababf3ff";
$wgSecretKey = "fd1587e1fdc6eb88687a1d18525db92ebf214317ee4760689135f0331e05999c";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "5051c93eb9140ca8";
$wgUpgradeKey = "2e8fbf3267405b69";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation

4
example.uploads.ini Normal file
View file

@ -0,0 +1,4 @@
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 7200
max_file_uploads = 1000

View file

@ -13,6 +13,7 @@ services:
- database
volumes:
- /var/www/html/images
#- ./wikidata:/var/www/html
# After initial setup, download LocalSettings.php to the same directory as
# this yaml and uncomment the following line and use compose to restart
# the mediawiki service
@ -22,7 +23,9 @@ services:
restart: always
environment:
# @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
MYSQL_DATABASE: rd13_mediawiki
MYSQL_DATABASE: rd13mediawikidb
MYSQL_USER: wikiuser
MYSQL_PASSWORD: rd13mediawikidbpw
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_PASSWORD: mwdbpw
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
volumes:
#- ./mdbdata:/var/lib/mysql