Skip to content

rjg21/mediawiki-mariadb-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example MediaWiki using MariaDB using Docker Compose

Starting the instance

# Start containers in background
$ docker-compose up -d

# Get name of database container
$ docker container ls -f "ancestor=mariadb"

# Import initial database (replace CONTAINER with name found above)
$ cat initdb.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=mariadb_secret my_wiki

Connecting to instance

Browse to: http://localhost:8000/

Login using user Admin and password supersecret (Should be changed in production)

Persist local volumes

The following directories and file are mounted in the respective containers and persist:

  • ./db -- MariaDB's database -- In container: /var/lib/mysql
  • ./images -- MediaWiki's uploads directory -- In container: /var/www/html/images
  • ./LocalSettings.php -- MediaWiki's installation settings -- In container: /var/www/html/LocalSettings.php

Backing-up and restoring the database

Replace CONTAINER with running MariaDB container

Backup

docker exec -i CONTAINER /usr/bin/mysqldump -u root --password=mariadb_secret my_wiki > backup.sql

Restore

cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=mariadb_secret my_wiki

About

Example MediaWiki using MariaDB using Docker Compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages