From de3543042b1294446a3c22aa6a8d116373dc13e9 Mon Sep 17 00:00:00 2001 From: madhusam Date: Wed, 24 Jan 2024 19:51:12 +0530 Subject: [PATCH 01/13] Added Dockerfile extns ExtJSBase BlueSpiceFoundation --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e928287..6f02893 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN chmod +x /usr/local/bin/composer RUN pecl install redis && docker-php-ext-enable redis ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_38} -ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown'} +ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown ExtJSBase BlueSpiceFoundation'} # List of extensions need depencies install using composer. ARG COMPOSER_INSTALL_EXTENSIONS="GoogleLogin " ARG MEDIAWIKI_SKINS=${MEDIAWIKI_SKINS:-'MinervaNeue '} From 68e1f8d444c7c0833f442e44bb861342c13755f5 Mon Sep 17 00:00:00 2001 From: madhusam Date: Thu, 25 Jan 2024 05:03:59 +0530 Subject: [PATCH 02/13] Added REL1_38 versions for ExtJSBase & BlueSpiceFoundation --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6f02893..3cf4e14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,6 +51,15 @@ RUN set -x; \ && git clone https://github.com/edwardspec/mediawiki-moderation $EXTENSION_DIR/Moderation \ && cd $EXTENSION_DIR/Moderation \ && git checkout -q 20f687956775671927535ff6952be2f6fec09043 + # ExtJSBase REL1_38 + && git clone https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ + && cd $EXTENSION_DIR/ExtJSBase \ + && git checkout -q REL1_38 + # BlueSpiceFoundation REL1_38 + && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ + && cd $EXTENSION_DIR/BlueSpiceFoundation \ + && git checkout -q REL1_38 + # Skins RUN for skin in $MEDIAWIKI_SKINS; do \ git clone --depth 1 -b $MEDIAWIKI_BRANCH $GERRIT_REPO/skins/$skin $SKIN_DIR/$skin; \ From 488afba238c553f28831b10edbad90f4f7df1937 Mon Sep 17 00:00:00 2001 From: Arul Date: Thu, 25 Jan 2024 05:10:31 +0530 Subject: [PATCH 03/13] Fix backslash in command --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3cf4e14..31c315f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,11 +50,11 @@ RUN set -x; \ # Moderation 1.6.21 && git clone https://github.com/edwardspec/mediawiki-moderation $EXTENSION_DIR/Moderation \ && cd $EXTENSION_DIR/Moderation \ - && git checkout -q 20f687956775671927535ff6952be2f6fec09043 + && git checkout -q 20f687956775671927535ff6952be2f6fec09043 \ # ExtJSBase REL1_38 && git clone https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ && cd $EXTENSION_DIR/ExtJSBase \ - && git checkout -q REL1_38 + && git checkout -q REL1_38 \ # BlueSpiceFoundation REL1_38 && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ && cd $EXTENSION_DIR/BlueSpiceFoundation \ From 93b2c6c742778608612ebca0f94c961a73de6886 Mon Sep 17 00:00:00 2001 From: madhusam Date: Thu, 25 Jan 2024 05:17:43 +0530 Subject: [PATCH 04/13] Added BlueSpiceFoundation to list of Composer-Install-Extensions --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 31c315f..92043e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN pecl install redis && docker-php-ext-enable redis ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_38} ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown ExtJSBase BlueSpiceFoundation'} # List of extensions need depencies install using composer. -ARG COMPOSER_INSTALL_EXTENSIONS="GoogleLogin " +ARG COMPOSER_INSTALL_EXTENSIONS="GoogleLogin BlueSpiceFoundation " ARG MEDIAWIKI_SKINS=${MEDIAWIKI_SKINS:-'MinervaNeue '} ARG GERRIT_REPO="https://gerrit.wikimedia.org/r/mediawiki" ARG EXTENSION_DIR="/var/www/html/extensions" @@ -58,7 +58,7 @@ RUN set -x; \ # BlueSpiceFoundation REL1_38 && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ && cd $EXTENSION_DIR/BlueSpiceFoundation \ - && git checkout -q REL1_38 + && git checkout -q REL1_38 \ # Skins RUN for skin in $MEDIAWIKI_SKINS; do \ From 4a5fcb9ec17568fbae6d5608f6286bcd93eb1e12 Mon Sep 17 00:00:00 2001 From: Arul Date: Thu, 25 Jan 2024 06:06:53 +0530 Subject: [PATCH 05/13] Remove from MEDIAWIKI_EXTENSIONS --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 92043e2..19d8c64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN chmod +x /usr/local/bin/composer RUN pecl install redis && docker-php-ext-enable redis ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_38} -ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown ExtJSBase BlueSpiceFoundation'} +ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown'} # List of extensions need depencies install using composer. ARG COMPOSER_INSTALL_EXTENSIONS="GoogleLogin BlueSpiceFoundation " ARG MEDIAWIKI_SKINS=${MEDIAWIKI_SKINS:-'MinervaNeue '} From fa7455b639f70ba5ab060f6760b92baa5e641dd6 Mon Sep 17 00:00:00 2001 From: Arul Date: Thu, 25 Jan 2024 07:04:55 +0530 Subject: [PATCH 06/13] fix typo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 19d8c64..67b840f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,7 @@ RUN set -x; \ # BlueSpiceFoundation REL1_38 && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ && cd $EXTENSION_DIR/BlueSpiceFoundation \ - && git checkout -q REL1_38 \ + && git checkout -q REL1_38 # Skins RUN for skin in $MEDIAWIKI_SKINS; do \ From 5600383432e615c3914c03218a4392bd2133669c Mon Sep 17 00:00:00 2001 From: Arul Date: Fri, 26 Jan 2024 21:40:57 +0530 Subject: [PATCH 07/13] php gd extension added for Bluespice composer changes for Bluespice --- Dockerfile | 76 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index 67b840f..52abec7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,14 @@ VOLUME [ "/var/www/html/images", "/var/www/html/cache", "/var/www/html/sitemap" RUN curl -L https://getcomposer.org/composer-2.phar > /usr/local/bin/composer RUN chmod +x /usr/local/bin/composer +# Install PHP extension gd for BlueSpiceFoundation +RUN apt-get update && apt-get install -y \ + libpng-dev \ + zlib1g-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* +RUN docker-php-ext-install gd + RUN pecl install redis && docker-php-ext-enable redis ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_38} @@ -26,39 +34,39 @@ RUN for extension in $MEDIAWIKI_EXTENSIONS; do \ done RUN set -x; \ - cd $EXTENSION_DIR \ - # GoogleLogin - && git clone $GERRIT_REPO/extensions/GoogleLogin $EXTENSION_DIR/GoogleLogin \ - && cd $EXTENSION_DIR/GoogleLogin \ - && git checkout -q e424b28c32fbe6ef020b1a83e966bdf8ba71ca83 \ - # ConfirmAccount - && git clone $GERRIT_REPO/extensions/ConfirmAccount $EXTENSION_DIR/ConfirmAccount \ - && cd $EXTENSION_DIR/ConfirmAccount \ - && git checkout -q 2973d2c5aa14069130998ac72f480166101395ca \ - # CategoryLockdown - && git clone $GERRIT_REPO/extensions/CategoryLockdown $EXTENSION_DIR/CategoryLockdown \ - && cd $EXTENSION_DIR/CategoryLockdown \ - && git checkout -q d6d2c7917d3000d0bee7d328ad9df86fcd156eea \ - # TabberNeue - 1.7.1 - && git clone https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue $EXTENSION_DIR/TabberNeue \ - && cd $EXTENSION_DIR/TabberNeue \ - && git checkout -q 6b530290a4da89f406c2119de43c0c8bab0f1a04 \ - # RottenLinks - 1.0.18 - && git clone https://github.com/Miraheze/RottenLinks $EXTENSION_DIR/RottenLinks \ - && cd $EXTENSION_DIR/RottenLinks \ - && git checkout -q 29bb9c7fdf080e79d976640748fb3ec1d67a9f04 \ - # Moderation 1.6.21 - && git clone https://github.com/edwardspec/mediawiki-moderation $EXTENSION_DIR/Moderation \ - && cd $EXTENSION_DIR/Moderation \ - && git checkout -q 20f687956775671927535ff6952be2f6fec09043 \ - # ExtJSBase REL1_38 - && git clone https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ - && cd $EXTENSION_DIR/ExtJSBase \ - && git checkout -q REL1_38 \ - # BlueSpiceFoundation REL1_38 - && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ - && cd $EXTENSION_DIR/BlueSpiceFoundation \ - && git checkout -q REL1_38 + cd $EXTENSION_DIR \ + # GoogleLogin + && git clone $GERRIT_REPO/extensions/GoogleLogin $EXTENSION_DIR/GoogleLogin \ + && cd $EXTENSION_DIR/GoogleLogin \ + && git checkout -q e424b28c32fbe6ef020b1a83e966bdf8ba71ca83 \ + # ConfirmAccount + && git clone $GERRIT_REPO/extensions/ConfirmAccount $EXTENSION_DIR/ConfirmAccount \ + && cd $EXTENSION_DIR/ConfirmAccount \ + && git checkout -q 2973d2c5aa14069130998ac72f480166101395ca \ + # CategoryLockdown + && git clone $GERRIT_REPO/extensions/CategoryLockdown $EXTENSION_DIR/CategoryLockdown \ + && cd $EXTENSION_DIR/CategoryLockdown \ + && git checkout -q d6d2c7917d3000d0bee7d328ad9df86fcd156eea \ + # TabberNeue - 1.7.1 + && git clone https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue $EXTENSION_DIR/TabberNeue \ + && cd $EXTENSION_DIR/TabberNeue \ + && git checkout -q 6b530290a4da89f406c2119de43c0c8bab0f1a04 \ + # RottenLinks - 1.0.18 + && git clone https://github.com/Miraheze/RottenLinks $EXTENSION_DIR/RottenLinks \ + && cd $EXTENSION_DIR/RottenLinks \ + && git checkout -q 29bb9c7fdf080e79d976640748fb3ec1d67a9f04 \ + # Moderation 1.6.21 + && git clone https://github.com/edwardspec/mediawiki-moderation $EXTENSION_DIR/Moderation \ + && cd $EXTENSION_DIR/Moderation \ + && git checkout -q 20f687956775671927535ff6952be2f6fec09043 \ + # ExtJSBase REL1_38 + && git clone https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ + && cd $EXTENSION_DIR/ExtJSBase \ + && git checkout -q REL1_38 \ + # BlueSpiceFoundation REL1_38 + && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ + && cd $EXTENSION_DIR/BlueSpiceFoundation \ + && git checkout -q REL1_38 # Skins RUN for skin in $MEDIAWIKI_SKINS; do \ @@ -67,6 +75,8 @@ RUN for skin in $MEDIAWIKI_SKINS; do \ # Install composer dependencies for extensions RUN for extension in $COMPOSER_INSTALL_EXTENSIONS; do \ + # this is for BlueSpiceFoundation + composer --working-dir=$EXTENSION_DIR/$extension config --no-plugins allow-plugins.composer/installers true; \ composer --working-dir=$EXTENSION_DIR/$extension install --no-dev; \ done From a901eee7011c9a3dfbfbec45edc8ea4b89ebba69 Mon Sep 17 00:00:00 2001 From: Arul Date: Sat, 27 Jan 2024 06:58:35 +0530 Subject: [PATCH 08/13] Fix #36 upgrade mediawiki to 1.39 LTS (#37) * Fix #36 upgrade mediawiki to 1.39 LTS change the ExtJSBase BlueSpiceFoundation installation to the standared way * Fix #36 update readme --- .github/workflows/docker-build-push.yml | 5 ++- Dockerfile | 18 +++-------- README.adoc | 42 ++++++++++++++++++++++++- development.override.yml | 6 ++-- docker-compose.apache.yml | 2 +- docker-compose.yml | 4 +-- 6 files changed, 56 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index f9bd6f0..3049c85 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -34,5 +34,8 @@ jobs: with: context: . push: true + build-args: + MEDIAWIKI_VERSION: 1.39.6 + MEDIAWIKI_BRANCH: REL1_39 tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 52abec7..7357e5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # Mention the required mediawiki version in build_args to upgrade / change the mediawiki -ARG MEDIAWIKI_VERSION=${MEDIAWIKI_VERSION:-1.38.2} +ARG MEDIAWIKI_VERSION=${MEDIAWIKI_VERSION:-1.39.6} +ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_39} # TODO: This has to be template based. The variant apache/fpm has to be passed as variable to template. FROM mediawiki:${MEDIAWIKI_VERSION}-fpm @@ -19,10 +20,9 @@ RUN docker-php-ext-install gd RUN pecl install redis && docker-php-ext-enable redis -ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_38} -ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown'} +ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown ExtJSBase BlueSpiceFoundation '} # List of extensions need depencies install using composer. -ARG COMPOSER_INSTALL_EXTENSIONS="GoogleLogin BlueSpiceFoundation " +ARG COMPOSER_INSTALL_EXTENSIONS=${COMPOSER_INSTALL_EXTENSIONS:-'GoogleLogin BlueSpiceFoundation '} ARG MEDIAWIKI_SKINS=${MEDIAWIKI_SKINS:-'MinervaNeue '} ARG GERRIT_REPO="https://gerrit.wikimedia.org/r/mediawiki" ARG EXTENSION_DIR="/var/www/html/extensions" @@ -58,15 +58,7 @@ RUN set -x; \ # Moderation 1.6.21 && git clone https://github.com/edwardspec/mediawiki-moderation $EXTENSION_DIR/Moderation \ && cd $EXTENSION_DIR/Moderation \ - && git checkout -q 20f687956775671927535ff6952be2f6fec09043 \ - # ExtJSBase REL1_38 - && git clone https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ - && cd $EXTENSION_DIR/ExtJSBase \ - && git checkout -q REL1_38 \ - # BlueSpiceFoundation REL1_38 - && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ - && cd $EXTENSION_DIR/BlueSpiceFoundation \ - && git checkout -q REL1_38 + && git checkout -q 20f687956775671927535ff6952be2f6fec09043 # Skins RUN for skin in $MEDIAWIKI_SKINS; do \ diff --git a/README.adoc b/README.adoc index 781e38f..1f61563 100644 --- a/README.adoc +++ b/README.adoc @@ -59,6 +59,31 @@ Login with your old admin username and password == Development +=== Adding new extension/plugin + +To add new extension/plugin, add the new extension name in the `Dockerfile` environmental variable `MEDIAWIKI_EXTENSIONS`. + +Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/Dockerfile#L23 + +If the extension is depends on composer install, add that in the `Dockerfile` environmental variable `COMPOSER_INSTALL_EXTENSIONS`. + +Then give PR. + +=== Adding new skin + +To add new skin, add the new skin name in the `Dockerfile` environmental variable `MEDIAWIKI_SKINS`. + +Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/Dockerfile#L26 + +Then give PR. + +=== Upgrading new mediawiiki version + +To upgrade mediawiki version, change the `MEDIAWIKI_VERSION` and `MEDIAWIKI_BRANCH` in Dockerfile, development.override.yml and github actions file. + +Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/Dockerfile#L2 +Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/.github/workflows/docker-build-push.yml#L38 + === Build a new image Change the `Dockerfile` for your need and build docker image @@ -67,4 +92,19 @@ Change the `Dockerfile` for your need and build docker image docker-compose -f docker-compose.yml -f development.override.yml build mediawiki ``` -=== Test new image in local \ No newline at end of file +=== Test new image in local + +* Make your changes in `Dockerfile` or `docker-compose.yml` +* Build docker image +* Then bringup the docker-compose + +=== Test new image in staging/testing environment + +* Make your changes in `Dockerfile` or `docker-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-` +* SSH into staging server +* Change the the version of `MEDIAWIKI_VERSION` in `.env` file to `pr-` +* Then restart the mediawiki container diff --git a/development.override.yml b/development.override.yml index 9f9caa4..626832f 100644 --- a/development.override.yml +++ b/development.override.yml @@ -1,4 +1,4 @@ -version: '2.4' +version: '3.9' services: @@ -7,5 +7,5 @@ services: context: . dockerfile: Dockerfile args: - MEDIAWIKI_VERSION: 1.38.2 - MEDIAWIKI_BRANCH: REL1_38 + MEDIAWIKI_VERSION: 1.39.6 + MEDIAWIKI_BRANCH: REL1_39 diff --git a/docker-compose.apache.yml b/docker-compose.apache.yml index 467f214..9d7fadf 100644 --- a/docker-compose.apache.yml +++ b/docker-compose.apache.yml @@ -1,4 +1,4 @@ -version: '2.4' +version: '3.9' x-default: &default dns: diff --git a/docker-compose.yml b/docker-compose.yml index 144592e..9cfa67e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2.4' +version: '3.9' x-default: &default dns: @@ -14,7 +14,7 @@ services: mediawiki: <<: *default - image: tamilwiki/mediawiki:1.38.2-fpm + image: tamilwiki/mediawiki:1.39.6-fpm ports: # The VisualEditor to work the host port and container port has to be same - 80:80 From fc71f2a6691085f5d5bf4a2847758ecdd0fda085 Mon Sep 17 00:00:00 2001 From: Arul Date: Sat, 27 Jan 2024 08:12:31 +0530 Subject: [PATCH 09/13] fix github action failure --- .github/workflows/docker-build-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 3049c85..a9afcfa 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -34,7 +34,7 @@ jobs: with: context: . push: true - build-args: + build-args: | MEDIAWIKI_VERSION: 1.39.6 MEDIAWIKI_BRANCH: REL1_39 tags: ${{ steps.meta.outputs.tags }} From 9453a808b4bc9bd57aaace6b1c68d9edf5b7a65a Mon Sep 17 00:00:00 2001 From: Arul Date: Sun, 11 Feb 2024 19:20:53 +0530 Subject: [PATCH 10/13] Fix cloning issue --- Dockerfile | 6 ++++-- README.adoc | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7357e5f..ccdc2fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ # Mention the required mediawiki version in build_args to upgrade / change the mediawiki ARG MEDIAWIKI_VERSION=${MEDIAWIKI_VERSION:-1.39.6} -ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_39} # TODO: This has to be template based. The variant apache/fpm has to be passed as variable to template. FROM mediawiki:${MEDIAWIKI_VERSION}-fpm +# Have to specify here to work inside this FROM +ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_39} + VOLUME [ "/var/www/html/images", "/var/www/html/cache", "/var/www/html/sitemap" ] # Composer @@ -30,7 +32,7 @@ ARG SKIN_DIR="/var/www/html/extensions" # Extensions RUN for extension in $MEDIAWIKI_EXTENSIONS; do \ - git clone --depth 1 -b $MEDIAWIKI_BRANCH $GERRIT_REPO/extensions/$extension $EXTENSION_DIR/$extension; \ + git clone --depth 1 --branch $MEDIAWIKI_BRANCH $GERRIT_REPO/extensions/$extension $EXTENSION_DIR/$extension; \ done RUN set -x; \ diff --git a/README.adoc b/README.adoc index 1f61563..4c31ee9 100644 --- a/README.adoc +++ b/README.adoc @@ -63,7 +63,7 @@ Login with your old admin username and password To add new extension/plugin, add the new extension name in the `Dockerfile` environmental variable `MEDIAWIKI_EXTENSIONS`. -Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/Dockerfile#L23 +Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/Dockerfile#L25 If the extension is depends on composer install, add that in the `Dockerfile` environmental variable `COMPOSER_INSTALL_EXTENSIONS`. @@ -73,7 +73,7 @@ Then give PR. To add new skin, add the new skin name in the `Dockerfile` environmental variable `MEDIAWIKI_SKINS`. -Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/Dockerfile#L26 +Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/Dockerfile#L28 Then give PR. From b56bcb92843dd4f86bbc7dc8dfe8bde6a3de8396 Mon Sep 17 00:00:00 2001 From: Arul Date: Sun, 11 Feb 2024 19:26:33 +0530 Subject: [PATCH 11/13] removed the extentions from env which are installing in specific version step --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ccdc2fd..cd841fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN docker-php-ext-install gd RUN pecl install redis && docker-php-ext-enable redis -ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge TabberNeue RevisionSlider RottenLinks Moderation LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown ExtJSBase BlueSpiceFoundation '} +ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge RevisionSlider LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown ExtJSBase BlueSpiceFoundation '} # List of extensions need depencies install using composer. ARG COMPOSER_INSTALL_EXTENSIONS=${COMPOSER_INSTALL_EXTENSIONS:-'GoogleLogin BlueSpiceFoundation '} ARG MEDIAWIKI_SKINS=${MEDIAWIKI_SKINS:-'MinervaNeue '} From 838cd550022f3c0ec1407df2e8aff33d143263d0 Mon Sep 17 00:00:00 2001 From: Arul Date: Wed, 21 Feb 2024 05:26:52 +0530 Subject: [PATCH 12/13] Revert back to 1.38 Install php-zip Install Bluespice from specific commit for 1.38 Add dependencies OOJSPlus --- .github/workflows/docker-build-push.yml | 4 ++-- Dockerfile | 22 ++++++++++++++++------ README.adoc | 2 +- development.override.yml | 4 ++-- docker-compose.yml | 2 +- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index a9afcfa..18ee52f 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -35,7 +35,7 @@ jobs: context: . push: true build-args: | - MEDIAWIKI_VERSION: 1.39.6 - MEDIAWIKI_BRANCH: REL1_39 + MEDIAWIKI_VERSION: 1.38.2 + MEDIAWIKI_BRANCH: REL1_38 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index cd841fa..fc32171 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ # Mention the required mediawiki version in build_args to upgrade / change the mediawiki -ARG MEDIAWIKI_VERSION=${MEDIAWIKI_VERSION:-1.39.6} +ARG MEDIAWIKI_VERSION=${MEDIAWIKI_VERSION:-1.38.2} # TODO: This has to be template based. The variant apache/fpm has to be passed as variable to template. FROM mediawiki:${MEDIAWIKI_VERSION}-fpm # Have to specify here to work inside this FROM -ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_39} +ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_38} VOLUME [ "/var/www/html/images", "/var/www/html/cache", "/var/www/html/sitemap" ] @@ -15,14 +15,16 @@ RUN chmod +x /usr/local/bin/composer # Install PHP extension gd for BlueSpiceFoundation RUN apt-get update && apt-get install -y \ libpng-dev \ + libzip-dev \ zlib1g-dev \ + unzip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN docker-php-ext-install gd +RUN docker-php-ext-install gd zip RUN pecl install redis && docker-php-ext-enable redis -ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge RevisionSlider LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown ExtJSBase BlueSpiceFoundation '} +ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge RevisionSlider LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown '} # List of extensions need depencies install using composer. ARG COMPOSER_INSTALL_EXTENSIONS=${COMPOSER_INSTALL_EXTENSIONS:-'GoogleLogin BlueSpiceFoundation '} ARG MEDIAWIKI_SKINS=${MEDIAWIKI_SKINS:-'MinervaNeue '} @@ -60,11 +62,19 @@ RUN set -x; \ # Moderation 1.6.21 && git clone https://github.com/edwardspec/mediawiki-moderation $EXTENSION_DIR/Moderation \ && cd $EXTENSION_DIR/Moderation \ - && git checkout -q 20f687956775671927535ff6952be2f6fec09043 + && git checkout -q 20f687956775671927535ff6952be2f6fec09043 \ + # ExtJSBase - For BlueSpiceFoundation + && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ + # OOJSPlus - For BlueSpiceFoundation + && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-OOJSPlus $EXTENSION_DIR/OOJSPlus \ + # BlueSpiceFoundation + && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ + && cd $EXTENSION_DIR/BlueSpiceFoundation \ + && git checkout -q e8df20e44c60622cc70c81c00696ef754df2df58 # Skins RUN for skin in $MEDIAWIKI_SKINS; do \ - git clone --depth 1 -b $MEDIAWIKI_BRANCH $GERRIT_REPO/skins/$skin $SKIN_DIR/$skin; \ + git clone --depth 1 --branch $MEDIAWIKI_BRANCH $GERRIT_REPO/skins/$skin $SKIN_DIR/$skin; \ done # Install composer dependencies for extensions diff --git a/README.adoc b/README.adoc index 4c31ee9..c74736b 100644 --- a/README.adoc +++ b/README.adoc @@ -89,7 +89,7 @@ Refer https://github.com/tamil-wiki/mediawiki-docker/blob/main/.github/workflows Change the `Dockerfile` for your need and build docker image ``` -docker-compose -f docker-compose.yml -f development.override.yml build mediawiki +docker-compose --progress plain -f docker-compose.yml -f development.override.yml build mediawiki --no-cache ``` === Test new image in local diff --git a/development.override.yml b/development.override.yml index 626832f..f1d569f 100644 --- a/development.override.yml +++ b/development.override.yml @@ -7,5 +7,5 @@ services: context: . dockerfile: Dockerfile args: - MEDIAWIKI_VERSION: 1.39.6 - MEDIAWIKI_BRANCH: REL1_39 + MEDIAWIKI_VERSION: 1.38.2 + MEDIAWIKI_BRANCH: REL1_38 diff --git a/docker-compose.yml b/docker-compose.yml index 9cfa67e..d132890 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: mediawiki: <<: *default - image: tamilwiki/mediawiki:1.39.6-fpm + image: tamilwiki/mediawiki:1.38.2-fpm ports: # The VisualEditor to work the host port and container port has to be same - 80:80 From 3c948cdf1bdd67b9459c843da7ee14ab4d04d974 Mon Sep 17 00:00:00 2001 From: Arul Date: Fri, 8 Mar 2024 21:30:41 +0530 Subject: [PATCH 13/13] Added BlueSpiceFilterableTables --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index fc32171..2598d48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,6 +67,8 @@ RUN set -x; \ && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ # OOJSPlus - For BlueSpiceFoundation && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-OOJSPlus $EXTENSION_DIR/OOJSPlus \ + # FilterableTables + && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFilterableTables $EXTENSION_DIR/BlueSpiceFilterableTables \ # BlueSpiceFoundation && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ && cd $EXTENSION_DIR/BlueSpiceFoundation \