Coder Social home page Coder Social logo

kristophjunge / docker-mediawiki Goto Github PK

View Code? Open in Web Editor NEW
62.0 8.0 41.0 126 KB

Dockerized MediaWiki running under Nginx and PHP-FPM. Based on the official PHP7 image. Packaged with VisualEditor plugin and Parsoid service.

License: MIT License

PHP 71.36% Shell 22.35% Python 6.29%

docker-mediawiki's Introduction

Docker MediaWiki

DockerHub Pulls DockerHub Stars GitHub Stars GitHub Forks GitHub License

MediaWiki

Docker container for MediaWiki running under Nginx and PHP-FPM. Based on the official PHP7 images.

Packaged with the VisualEditor plugin and its dependant Parsoid service.

This container is running 3 processes (Nginx, PHP-FPM, Parsoid) controlled by supervisord.

For a basic understanding of docker please refer to the official documentation.

Supported Tags

Features

Changelog

See CHANGELOG.md for information about the latest changes.

Please note that version 1.30 has some breaking changes.

Usage

With MySQL

See Docker Compose example.

Start a MySQL container.

docker run --name=mediawiki_mysql \
-e MYSQL_DATABASE=wikidb \
-e MYSQL_USER=wikiuser \
-e MYSQL_PASSWORD=mysecret \
-e MYSQL_RANDOM_ROOT_PASSWORD=1 \
-v /var/mediawiki/mysql:/var/lib/mysql \
-d mysql:5.7

Start MediaWiki container.

docker run --name mediawiki_wiki \
--link mediawiki_mysql:mediawiki_mysql \
-p 8080:8080 \
-e MEDIAWIKI_SERVER=http://localhost:8080 \
-e MEDIAWIKI_SITENAME=MyWiki \
-e MEDIAWIKI_LANGUAGE_CODE=en \
-e MEDIAWIKI_DB_TYPE=mysql \
-e MEDIAWIKI_DB_HOST=mediawiki_mysql \
-e MEDIAWIKI_DB_PORT=3306 \
-e MEDIAWIKI_DB_NAME=wikidb \
-e MEDIAWIKI_DB_USER=wikiuser \
-e MEDIAWIKI_DB_PASSWORD=mysecret \
-e MEDIAWIKI_ENABLE_UPLOADS=1 \
-v /var/mediawiki/images:/images \
-d kristophjunge/mediawiki

Create a new database with the install script. Insert username and password for your admin account.

docker exec -it mediawiki_wiki /script/install.sh <username> <password>

If you are using an existing database run the update script instead.

docker exec -it mediawiki_wiki /script/update.sh

Copy the secret key that the install script dumps or find the variable $wgSecretKey in your previous LocalSettings.php file and put it into an environment variable.

-e MEDIAWIKI_SECRET_KEY=secretkey

If you are using an existing database find the variable $wgDBTableOptions in your previous LocalSettings.php file and put it into an environment variable.

-e MEDIAWIKI_DB_TABLE_OPTIONS=ENGINE=InnoDB, DEFAULT CHARSET=binary

You should be able to browse your wiki at http://localhost:8080.

With SQLite

See Docker Compose example.

Start MediaWiki container.

docker run --name=mediawiki_wiki \
-p 8080:8080 \
-e MEDIAWIKI_SERVER=http://localhost:8080 \
-e MEDIAWIKI_SITENAME=MyWiki \
-e MEDIAWIKI_LANGUAGE_CODE=en \
-e MEDIAWIKI_DB_TYPE=sqlite \
-e MEDIAWIKI_DB_NAME=wikidb \
-e MEDIAWIKI_ENABLE_UPLOADS=1 \
-v /var/mediawiki/images:/images \
-v /var/mediawiki/data:/data \
-d kristophjunge/mediawiki

Create a new database with the install script. Insert username and password for your admin account.

docker exec -it mediawiki_wiki /script/install.sh <username> <password>

If you are using an existing database run the update script instead.

docker exec -it mediawiki_wiki /script/update.sh

Copy the secret key that the install script dumps or find the variable $wgSecretKey in your previous LocalSettings.php file and put it into an environment variable.

-e MEDIAWIKI_SECRET_KEY=secretkey

You should be able to browse your wiki at http://localhost:8080.

Configuration

General

Set the mandatory environment variables:

  • Set MEDIAWIKI_SERVER to your wiki's primary domain, prefixed with the primary protocol.
  • Set MEDIAWIKI_SITENAME to your wiki's name.
  • Set MEDIAWIKI_LANGUAGE_CODE to a language code of this list.
-e MEDIAWIKI_SERVER=http://wiki.example.com \
-e MEDIAWIKI_SITENAME=MyWiki \
-e MEDIAWIKI_LANGUAGE_CODE=en

Uploads

To enable file uploads set the environment variable MEDIAWIKI_ENABLE_UPLOADS to 1.

-e MEDIAWIKI_ENABLE_UPLOADS=1

Mount a writable volume to the images folder.

-v /var/mediawiki/images:/images

Which file extensions are allowed for uploading can be controlled with the environment variable MEDIAWIKI_FILE_EXTENSIONS.

-e MEDIAWIKI_FILE_EXTENSIONS=png,gif,jpg,jpeg,webp,pdf

The maximum size for file uploads can be controlled with the environment variable MEDIAWIKI_MAX_UPLOAD_SIZE.

-e MEDIAWIKI_MAX_UPLOAD_SIZE=100M

E-Mail

SMTP E-Mail can be enabled by setting MEDIAWIKI_SMTP to 1. TLS auth will be used by default.

-e MEDIAWIKI_SMTP=1
-e MEDIAWIKI_SMTP_HOST=smtp.example.com
-e MEDIAWIKI_SMTP_IDHOST=example.com
-e MEDIAWIKI_SMTP_PORT=587
-e MEDIAWIKI_SMTP_AUTH=1
-e [email protected]
-e MEDIAWIKI_SMTP_PASSWORD=secret

Using a self-signed certificate will not work because of failing peer verification. If you know the security implications you can disable peer verification by setting MEDIAWIKI_SMTP_SSL_VERIFY_PEER to 0.

Logo

You can setup your own logo by mounting a PNG file.

-v ./var/mediawiki/logo.png:/var/www/mediawiki/resources/assets/wiki.png:ro

Skins

You can change the default skin by setting the environment variable MEDIAWIKI_DEFAULT_SKIN.

-e MEDIAWIKI_DEFAULT_SKIN=vector

The default skins are packaged with the container:

  • cologneblue
  • modern
  • monobook
  • vector

You can add more skins by mounting them.

-v ./var/mediawiki/skins/MyOtherSkin:/var/www/mediawiki/skins/MyOtherSkin:ro

HTTPS

HTTPS is not longer supported by the container itself. Its recommended to use a proxy container for HTTPS setups.

Make sure that you set the MEDIAWIKI_SERVER environment variable to the outside URL of your wiki and to apply the https prefix.

-e MEDIAWIKI_SERVER=https://localhost

Extensions

You can add more extensions by mounting them.

-v ./var/mediawiki/extensions/MyOtherExtension:/var/www/mediawiki/extensions/MyOtherExtension:ro

Additional configuration

You can add own PHP configuration values by mounting an additional configuration file that is loaded at the end of the generic configuration file.

-v /var/mediawiki/ExtraLocalSettings.php:/var/www/mediawiki/ExtraLocalSettings.php:ro

A good starting point is to copy the file that's inside the container. You can display its content with the following command.

docker exec -it mediawiki_wiki cat /var/www/mediawiki/ExtraLocalSettings.php

Configuration file

Beside the docker like configuration with environment variables you still can use your own full LocalSettings.php file.

However this will make all environment variables unusable except MEDIAWIKI_HTTPS and MEDIAWIKI_SMTP_SSL_VERIFY_PEER.

-v /var/mediawiki/LocalSettings.php:/var/www/mediawiki/LocalSettings.php:ro

Performance

The container has some performance related configuration options. If you have more advanced needs you can override the configuration inside the container by mounting configuration files.

The number of PHP-FPM worker processes can be configured with the environment variables PHPFPM_WORKERS_START, PHPFPM_WORKERS_MIN and PHPFPM_WORKERS_MAX.

-e PHPFPM_WORKERS_START=10
-e PHPFPM_WORKERS_MIN=10
-e PHPFPM_WORKERS_MAX=20

Default for start and min is 1. Default for max is 20, so up to 20 worker processes will be spawned dynamically when needed.

For a more advanced configuration of PHP-FPM mount a configuration file to /usr/local/etc/php-fpm.conf.

-v /var/mediawiki/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro

The number of Parsoid worker processes can be configured with the environment variable PARSOID_WORKERS.

-e PARSOID_WORKERS=10

Default is 1. Please note that the number of Parsoid workers is not managed dynamically. Make sure that you spawn enough workers for your requirements.

For a more advanced configuration of Parsoid mount a configuration file to /usr/lib/parsoid/src/config.yaml.

-v /var/mediawiki/config.yaml:/usr/lib/parsoid/src/config.yaml:ro

Configuration reference

Below is a list of all environment variables supported by the container.

When using an own LocalSettings.php file according to the section "Configuration file" most variables be unusable.

To modify configuration values that are not listed below read the section "Additional configuration".

More information about the configuration values can be found at MediaWiki's documentation.

Environment Variable MediaWiki Config Description
MEDIAWIKI_SMTP - Enable SMTP mailing, Default 0
MEDIAWIKI_SMTP_SSL_VERIFY_PEER - Disable SMTP auth SSL peer verification, Default 0
MEDIAWIKI_DEBUG - Enable mediawiki's debug log, Logged to /tmp/wiki-debug.log
MEDIAWIKI_SERVER $wgServer The primary URL of the server prefixed with protocol
MEDIAWIKI_SITENAME $wgSitename Name of the wiki
MEDIAWIKI_LANGUAGE_CODE $wgLanguageCode Language code for wiki language
MEDIAWIKI_META_NAMESPACE $wgMetaNamespace Namespace, Defaults to MEDIAWIKI_SITENAME
MEDIAWIKI_SECRET_KEY $wgSecretKey Secret key
MEDIAWIKI_UPGRADE_KEY $wgUpgradeKey Upgrade key
MEDIAWIKI_DB_TYPE $wgDBtype Database type
MEDIAWIKI_DB_HOST $wgDBserver Database host
MEDIAWIKI_DB_PORT $wgDBserver Database port
MEDIAWIKI_DB_NAME $wgDBname Database name
MEDIAWIKI_DB_USER $wgDBuser Database user
MEDIAWIKI_DB_PASSWORD $wgDBpassword Database password
MEDIAWIKI_DB_PREFIX $wgDBprefix Database table name prefix
MEDIAWIKI_DB_TABLE_OPTIONS $wgDBTableOptions Table options
MEDIAWIKI_ENABLE_UPLOADS $wgEnableUploads Enable file uploads, Default 0
MEDIAWIKI_MAX_UPLOAD_SIZE $wgMaxUploadSize Max file upload size, Default 100M
MEDIAWIKI_EXTENSION_VISUAL_EDITOR_ENABLED - Enable the VisualEditor plugin, Default 1
MEDIAWIKI_EXTENSION_USER_MERGE_ENABLED - Enable the UserMerge plugin, Default 1
MEDIAWIKI_FILE_EXTENSIONS $wgFileExtensions Allowed file extensions, comma separated
MEDIAWIKI_DEFAULT_SKIN $wgDefaultSkin Default skin, Default "vector"
MEDIAWIKI_SMTP_HOST $wgSMTP SMTP Host, like smtp.example.com
MEDIAWIKI_SMTP_IDHOST $wgSMTP Domain name, like example.com
MEDIAWIKI_SMTP_PORT $wgSMTP SMTP Port
MEDIAWIKI_SMTP_AUTH $wgSMTP Enable SMTP auth, Default 0
MEDIAWIKI_SMTP_USERNAME $wgSMTP SMTP auth username
MEDIAWIKI_SMTP_PASSWORD $wgSMTP SMTP auth password
MEDIAWIKI_EMERGENCY_CONTACT $wgEmergencyContact Admin contact E-Mail
MEDIAWIKI_PASSWORD_SENDER $wgPasswordSender E-Mail sender for password forgot mails
PHPFPM_WORKERS_START - Number of PHP-FPM worker processes to be started initially, Default 1
PHPFPM_WORKERS_MIN - Minimum number of PHP-FPM worker processes, Default 1
PHPFPM_WORKERS_MAX - Maximum number of PHP-FPM worker processes, Default 20
PARSOID_WORKERS - Static number of Parsoid worker processes, Default 1

Extending this image

If you need to create your own Dockerfile you can extend this image.

FROM kristophjunge/mediawiki:latest

COPY ./LocalSettings.php /var/www/mediawiki/LocalSettings.php

# ...

Security

  • Nginx and PHP-FPM worker processes run under the www-data user with UID 999 and GID 999.
  • Parsoid runs under the parsoid user.
  • Parsoid runs only inside the container. There is no port exposed.
  • The MediaWiki files are owned by root. Only the images folder is owned by www-data.
  • The Parsoid files are all owned by root.
  • During container build signatures and keys of installed software is verified where possible.

Contributing

See CONTRIBUTING.md for information on how to contribute to the project.

See CONTRIBUTORS.md for the list of contributors.

License

This project is licensed under the MIT license by Kristoph Junge.

docker-mediawiki's People

Contributors

sepastian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-mediawiki's Issues

MEDIAWIKI_FILE_EXTENSIONS issue: Cannot upload PDF file

I installed this image/docker on my Synology NAS. It's working and I even managed to upload an image to a wiki page using drag & drop.

Then I tried to upload PDF files, too, and failed.

According to MediaWiki manual, the default list of allowed extensions is 'png', 'gif', 'jpg', 'jpeg', 'webp' and all others are blocked. To add more extensions, this container provides the environment variable MEDIAWIKI_FILE_EXTENSIONS.

Although I set the environment variable
MEDIAWIKI_FILE_EXTENSIONS=png,gif,jpg,jpeg,doc,xls,mpp,pdf,ppt,tiff,bmp,docx,xlsx,pptx,ps,odt,ods,odp,odg
I get an error when uploading a PDF file (see screenshot). Why is this and is this a image/container issue or rather a MediaWiki issue?

image

Error building with docker-compose

Cloned master to a clean directory and ran docker-compose -f docker-compose.yml up and received the following error:

E: Unable to locate package libicu52
ERROR: Service 'mediawiki_wiki' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libicu-dev g++ --no-install-recommends &&     docker-php-ext-install intl &&     apt-get install -y --auto-remove libicu52 g++ &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Docker engine: Docker version 18.06.1-ce, build e68fc7a
Docker compose: docker-compose version 1.22.0, build f46880fe

Specifying ExtraLocalSettings.php results in displaying contents of extralocalsettings.php

Hi,

First off great image, and thanks for making this available for all of us. I did run into an issue when I tried defining some custom settings in my ExtraLocalSettings.php. I'm loading a custom skin "Timeless" by following your directions and mounting the following 2:
-v /var/mediawiki/skins/Timeless:/var/www/mediawiki/skins/Timeless:ro
-v /var/mediawiki/ExtraLocalSettings.php:/var/www/mediawiki/ExtraLocalSettings.php:ro

My ExtraLocalSettings.php is very simple and looks like this (I also tried copying the ExtraLocalSettings.php form inside the container).

wfLoadSkin( 'Timeless' );

But when I launch the container and browse to the site, I get a blank page that displays the contents of ExtraLocalSettings.php. Any ideas?

VisualEditor doesn't work in special usecase

Hey all,

I have a working instance of this Docker Image but the VisualEditor Extension doesn't work in my case.

Basic Situation

I have a working Debian Stretch box with Docker CE. The box is headless so I'm using the Wiki not from localhost. Also HTTPS is enabled on the box. My DNS server provides the domain mywiki.int which is used by the wiki. The network get's accessed trough a VPN.

The problem

In my wiki the Edit button doesn't appear. Only the Edit Source button appears. VisualEditor is listed on Special:Versions as extension.

What I found out

  1. VisualEditor needs Parsoid. Parsoid is running in my Docker Container at (I think so) TCP port 9000.
  2. Parsoid needs a working MediaWiki API URL to communicate to MediaWiki. Parsoid does the conversion between HTML and WikiText.
  3. The config file of Parsoid is /etc/mediawiki/parsoid/config.yaml. The API URL in this file http://localhost/w/api.php is invalid. It can't be found. When I try to curl this it doesn't exist. Also a redirection to HTTPS is done.
  4. It seems that the port 9000 isn't reachable. When I try to curl it to let Parsoid parse I get a connection refused.
  5. My Certificate is self signed. This could be a problem due to the fact that I don't know how Parsoid handels this.

What I think the problem is

  1. The not reachable port 9000
  2. The fact that the API URL in config.yaml doesn't exist.

Question

How can I solve this problem when my wiki is reachable at https://mywiki.int and not used form localhost when HTTPS is enabled?

I would try to change the API URL in config.yaml to the correct one and try to figure out what's wrong with the port.

Does someone has a solution for this?

Best Regards

Memory usage

Short question: How much memory does the the container use in average.
I extended the image with composer und the chameloen skin and now it uses about 380 MB of RAM.

Have you encountered similar numbers?

$wgDBprefix not used during install an in wiki

I think I found a bug or the documentation is not correct.

It's said the default value of MEDIAWIKI_DB_TYPE is 'mysql', but thats not true. The default value in LocalSettings.php is ''. For that reason the wiki does not look for the MEDIAWIKI_DB_PREFIX envirevent variable.

# MySQL specific settings
if (getenv('MEDIAWIKI_DB_TYPE') == 'mysql') {
    // Cache sessions in database
    $wgSessionCacheType = CACHE_DB;

    if (getenv('MEDIAWIKI_DB_PREFIX') != '') {
        $wgDBprefix = getenv('MEDIAWIKI_DB_PREFIX');
    }

    if (getenv('MEDIAWIKI_DB_TABLE_OPTIONS') != '') {
        $wgDBTableOptions = getenv('MEDIAWIKI_DB_TABLE_OPTIONS');
    }
}

This is solvable by using the MEDIAWIKI_DB_TYPE variable.

The next problem I don't understand.

The installer seems to ignore the MEDIAWIKI_DB_PREFIX as well, even with MEDIAWIKI_DB_TYPE set to mysql.
I cant find the sourcecode for this. Can anybody help?

mime.types not included

$ grep -i mime ./config/nginx/nginx-http.conf ./config/nginx/nginx-details.conf ./config/nginx/nginx-https.conf
$

The nginx conf doesn't, as far as I can tell, load /etc/nginx/mime.types at all. This leads to things like uploaded PDFs being returned as text/plain.

Failed to start Container

Hi,

it is not possible to start this Container, the Message gives:

Error response from daemon: containerd: container not started
Error: failed to start containers: mediawiki

journalctl -f -u docker.service gives:

May 11 18:01:11 xxxxx.com dockerd[1422]: time="2017-05-11T18:01:11.130133084+02:00" level=error msg="Handler for POST /v1.24/containers/mediawiki/start returned error: containerd: container not started"

According to another Thread (moby/moby#31437) the reason could be the Fact, that the Entrypoint Script has no Executable Bit set?

Dockerfile incompatible with MacOS > 10.7

The Dockerfile uses a grep command with attribute "-P". this was removed from MacOS higher then 10.7. Workaround for me was to install another version of grep then the default. "brew install grep --with-default-names".

How to use different context url ?

Thank you very munch for this project that is really easy to setup.
But in my case, I have an issue because I 'm replacing an existing instance of mediawiki and this one was accessible with an url of kind http://www.domain.com/wiki
I installed it on a server who give access to many application so I have an nginx reverse proxy in front of your project with configuration like :

    location /wiki/ {
            proxy_pass http://mediawiki-wiki:8080/;
            
    }  

But it does not work because with the nginx from your mediawiki setup. I get many redirection.

I tried many things by changing MEDIAWIKI_SERVER value or adding $wgArticlePath = '/wiki/$1';
but none works.

How to solve my issue and be able to use your project behind an nginx proxy with a context url : /wiki ?

Thanks a lot.

/images not writable for webserver process

Hi there,
I'm new to Docker. Additionally, I'm running Docker on a Synology NAS. This might be a different flavour as on regular Linux systems. So please beware.

After following the instructions, I got the container up and running. The visual editor works like a charm. Awesome!

However, when I tried to upload an image, I got a strange error message: "Could not store upload in the stash (UploadStashFileException): "Error storing file in '/tmp/phpxQt4k1': Could not create directory"

I opened a shell on the running container and indeed, /images was not accessible for user www-data:
drwxr-xr-x 1 1024 users 0 Jan 18 12:07 images

According to /etc/passwd, there's no user with id 1024 (www-data is 999).

To resolve this issue in a quick&dirty manner, I set the permission of the folder to 777:
chmod 777 /images

Now uploading images works.

Any idea why the permissions might be wrong in my container?

cache sessions in DB

Known issues

  • Sessions are stored in memory via APC and will be lost after container stop.

What about using $wgSessionCacheType = CACHE_DB; in LocalSettings.php? According to the docs, this should save session tokens in Database and database should be persistent and survive a reboot.

I tested it with ExtraLocalSettings.php and it seems to work. I couldn't verify it by 100% (it's 3am).

FB to your image: Keep up the good work! This docker image is absolutely high quality! ๐Ÿ‘

Install Problems: Cannot access the database

Hi,
when i follow your documentation on DockerHub, i get an issue when i run the install script.
I get the error: "Cannot access the database: Access denied for user 'wikiuser'@'172.17.0.6' (using password: YES) (mysql-server). Check the host, username and password and try again."

What can i do to solve the issue?

Many thanks for your answers

Support for composer.local.json

Hey, awesome container, thank you for creating this!

One thing I noticed is that many modern MediaWiki plugins and themes require the use of Composer (which is a good thing). Sadly it seems like the container does not support that.

It would be awesome if you could include some kind of mechanism to automatically install plugins specified in composer.local.json, as this would mean that we are able to define and update dependencies externally.

Thank you! :)

A few thoughts...

Hey, thanks for posting this code on github! I am hoping to use it to update an older wiki that we use for a game. When I was going through your implementation, I came across a few things that I might recommend.

  • Include in the README how to override the default docker-composer file by using docker-compose.override.yml
  • Adding to the previous thought, add the ability to add or override the existing Dockerfile
  • Add ${DB_HOST} as an environment variable that can be changed easily
  • Separate/Remove all variables that are in LocalSettings.php that are not relevant to the build and place in ExtraLocalSettings.php
    • For example, $wgGroupPermissions['*']['createaccount'] = false; and etc...

Thank you for your time,

Rev

Error during install

Thanks for this container!

When trying to install, I get the following error:

docker exec -i -t mediawiki /script/install.sh sebastian <password>
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 7.1.0 is installed.
Found ImageMagick: /usr/bin/convert.
Image thumbnailing will be enabled if you enable uploads.
Found the Git version control software: /usr/bin/git.
Using server URL "/".
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
Warning: Your default directory for uploads (/var/www/mediawiki/images/) is not checked for vulnerability
to arbitrary script execution during the CLI install.
Using the intl PECL extension for Unicode normalization.
The environment has been checked.
You can install MediaWiki.
Setting up database
done
Creating tables
done
Creating database user
[c92a15dca702094194ea7e14] [no req]   Error from line 560 of /var/www/mediawiki/includes/installer/MysqlInstaller.php: Call to undefined method DBQueryError::getText()
Backtrace:
#0 /var/www/mediawiki/includes/installer/Installer.php(1515): MysqlInstaller->setupUser(MysqlInstaller)
#1 /var/www/mediawiki/includes/installer/CliInstaller.php(135): Installer->performInstallation(array, array)
#2 /var/www/mediawiki/maintenance/install.php(142): CliInstaller->execute()
#3 /var/www/mediawiki/maintenance/doMaintenance.php(111): CommandLineInstaller->execute()
#4 /var/www/mediawiki/maintenance/install.php(156): require_once(string)
#5 {main}

grep: LocalSettings.php: No such file or directory

From what I can tell, install.php fails here; as a consequence, LocalSettings.php never gets moved back from /tmp/ to /var/www/mediawiki/, which is why grep fails.

I noticed that script/install.sh passes Wiki to install.php; shouldn't this be $MEDIAWIKI_SITENAME instead?

I'm using the following commands to start docker containers:

#!/bin/bash
docker run --name mediawiki-mysql \
       -e MYSQL_DATABASE=mediawiki \
       -e MYSQL_USER=mediawiki \
       -e MYSQL_PASSWORD=mediawiki \
       -e MYSQL_RANDOM_ROOT_PASSWORD=1 \
       -v /data/mediawiki/mysql:/var/lib/mysql \
       -d mysql:5.7
docker run --name mediawiki \
       --link mediawiki-mysql:mysql \
       -p 8085:80 \
       -e MEDIAWIKI_SERVER=http://my.server.com:8085 \
       -e MEDIAWIKI_SITENAME=NameOfWiki \
       -e MEDIAWIKI_LANGUAGE_CODE=de \
       -e MEDIAWIKI_DB_TYPE=mysql \
       -e MEDIAWIKI_DB_HOST=mediawiki-mysql \
       -e MEDIAWIKI_DB_PORT=3306 \
       -e MEDIAWIKI_DB_NAME=mediawiki \
       -e MEDIAWIKI_DB_USER=mediawiki \
       -e MEDIAWIKI_DB_PASSWORD=mediawiki \
       -e MEDIAWIKI_ENABLE_UPLOADS=1 \
       -v /data/mediawiki/images:/images \
       -v /data/mediawiki/logo.png:/var/www/mediawiki/resources/assets/wiki.png:ro \
       -d kristophjunge/mediawiki

Do you know what's going on here?

"images" needs chmod 777

Uploads don't work if /images is not chmod 777.

Also the /data folder looks useless, what is it used for?

Documentation incomplete for -e variables

The documentation is incomplete and does not finish with a working Docker based MediaWiki install.

The trouble starts with the way the environment variables are presented. It is step by step with editable commands then ends into -e for this and -e for that with no presentation on how to use these. This should be corrected to show methods on how to incorporate the various additional -e variables. This should be made plain for newer Docker users who are not veterans of the system.

The strategy appears to be to take multiple attempts at docker -run, delete if you get it wrong, and there is no way to edit the -e after the first docker -run.

Container doesnt start

In the logs i see :

[emerg] 12#12: socket() [::]:80 failed (97: Address family not supported by protocol)
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

Build problems

When I build your dockerfile I get an error :

Package php-pear is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-pear' has no installation candidate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.