comments
This commit is contained in:
parent
b2565d40f2
commit
76c8f27ead
10
Dockerfile
10
Dockerfile
@ -1,10 +1,18 @@
|
|||||||
FROM tutum/apache-php:latest
|
# Mediawiki-Apache
|
||||||
|
#
|
||||||
|
# Version 1.0
|
||||||
|
|
||||||
|
FROM tutum/apache-php:latest
|
||||||
|
MAINTAINER John E Arnold <iohannes.eduardus.arnold@gmail.com>
|
||||||
|
|
||||||
|
# Remove the old hello world app and grab Mediawiki source
|
||||||
RUN rm -fr /app && git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git /app
|
RUN rm -fr /app && git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git /app
|
||||||
RUN cd /app && git checkout -b REL1_23 origin/REL1_23
|
RUN cd /app && git checkout -b REL1_23 origin/REL1_23
|
||||||
|
|
||||||
|
# Create the section for persistent files
|
||||||
RUN mkdir /var/lib/mediawiki
|
RUN mkdir /var/lib/mediawiki
|
||||||
|
|
||||||
|
# Move the files that need to be persistent and create symbolic links to them
|
||||||
RUN mv /app/images /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/images /app/images
|
RUN mv /app/images /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/images /app/images
|
||||||
RUN mv /app/skins /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/skins /app/skins
|
RUN mv /app/skins /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/skins /app/skins
|
||||||
RUN touch /var/lib/mediawiki/LocalSettings.php && ln -s /var/lib/mediawiki/LocalSettings.php /app/LocalSettings.php
|
RUN touch /var/lib/mediawiki/LocalSettings.php && ln -s /var/lib/mediawiki/LocalSettings.php /app/LocalSettings.php
|
||||||
|
26
README.md
26
README.md
@ -1,2 +1,26 @@
|
|||||||
mediawiki-docker
|
Mediawiki-Apache
|
||||||
================
|
================
|
||||||
|
|
||||||
|
This is a Docker image running Apache serving Mediawiki 1.23. It does not contain any databases; those should be run in a seperate container.
|
||||||
|
|
||||||
|
First, deploy a database container, [like this one by Tutum](https://registry.hub.docker.com/u/tutum/mariadb/):
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -d --name mariadb tutum/mariadb
|
||||||
|
```
|
||||||
|
|
||||||
|
You will likely want to make the database persistent, in this case done by adding:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -d -v /path/on/host:/var/lib/mysql --name mariadb tutum/mariadb
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can deploy this container by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -d -p 80:80 -v /path/on/host:/var/lib/mediawiki --link mariadb:mariadb iohannesarnold/mediawiki-apache
|
||||||
|
```
|
||||||
|
|
||||||
|
Where the ```-v`` flag is only necessary if you're interested in preserving files. Also, the ```link``` flag should reflect the name you gave your database container above.
|
||||||
|
Mediawiki should now be available on port 80 of the host server, and it will ask you to run configuration. The ```LocalSettings.php``` that results should be placed in the linked host directory created in the last step.
|
||||||
|
Congratulations! You now should have a working Mediawiki installation. Any updated version of this image should be able to be deployed over the same host directory for fast upgrades.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user