-
Docker 19.03.13 or latest
-
Docker compose 1.29.2 or latest
Install docker
curl -ksSL https://get.docker.com/ | sh
curl -ksSL https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker | sudo tee /etc/bash_completion.d/docker
sudo usermod -aG docker ${USER}Install docker-compose
sudo curl -ksSL https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
curl -ksSL https://raw.githubusercontent.com/docker/compose/$(docker-compose --version | awk 'NR==1{print $NF}')/contrib/completion/bash/docker-compose | sudo tee /etc/bash_completion.d/docker-composedocker-compose up -dThen
Login with username "admin" and password in your env "MEDIAWIKI_ADMIN_PASS". Refer docker-compose.yml
-
Backup your wiki database and images folder.
-
Copy your "images" folder where the
docker-compose.ymlfile reside -
Bringup database only
docker-compose up -d database-
Then copy your sql file inside the container and mysql import
docker cp dump.sql $(docker-compose ps -q database):/dump.sql
docker-compose exec database bash -c "mysql --host localhost --protocol tcp --port 3306 --user \$MYSQL_USER --password=\$MYSQL_PASSWORD \$MYSQL_DATABASE < /dump.sql"-
Then bring-up media wiki
docker-compose up -d mediawikiLogin with your old admin username and password
To add new extension/plugin, add the new extension name in the Dockerfile environmental variable MEDIAWIKI_EXTENSIONS.
If the extension is depends on composer install, add that in the Dockerfile environmental variable COMPOSER_INSTALL_EXTENSIONS.
Then give PR.
To add new skin, add the new skin name in the Dockerfile environmental variable MEDIAWIKI_SKINS.
Then give PR.
To upgrade mediawiki version, change the MEDIAWIKI_VERSION and MEDIAWIKI_BRANCH in Dockerfile, development.override.yml and github actions file.
Change the Dockerfile for your need and build docker image
docker-compose --progress plain -f docker-compose.yml -f development.override.yml build mediawiki --no-cache-
Make your changes in
Dockerfileordocker-compose.yml -
Build docker image
-
Then bringup the docker-compose
-
Make your changes in
Dockerfileordocker-compose.yml -
Create PR
-
Wait for CI to build and push the image to docker hub
-
The docker image will be pushed to https://hub.docker.com/r/tamilwiki/mediawiki/tags
-
Usually it will take 5-10 minutes, the tag will be
pr-<PR_NUMBER> -
SSH into staging server
-
Change the the version of
MEDIAWIKI_VERSIONin.envfile topr-<PR_NUMBER> -
Then restart the mediawiki container