Compare commits
No commits in common. "7184e94feb32c4e0a1348cf85899ec06d0a835aa" and "84ad49dadc56497d2e940fddc49a284811cafe6f" have entirely different histories.
7184e94feb
...
84ad49dadc
4 changed files with 31 additions and 81 deletions
|
@ -5,39 +5,36 @@ WORKDIR /usr/src
|
|||
RUN apk update && apk add git
|
||||
|
||||
ADD https://releases.wikimedia.org/mediawiki/1.42/mediawiki-1.42.3.tar.gz .
|
||||
RUN tar -xzf mediawiki-1.42.3.tar.gz && mv mediawiki-1.42.3 mediawiki
|
||||
RUN tar -xzf mediawiki-1.42.3.tar.gz
|
||||
|
||||
WORKDIR /usr/src/mediawiki
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend; \
|
||||
rm -rf MobileFrontend/.git
|
||||
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend extensions/MobileFrontend; \
|
||||
rm -rf extensions/MobileFrontend/.git
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/PluggableAuth; \
|
||||
rm -rf PluggableAuth/.git
|
||||
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/PluggableAuth extensions/PluggableAuth; \
|
||||
rm -rf extensions/PluggableAuth/.git
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect; \
|
||||
rm -rf OpenIDConnect/.git
|
||||
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect extensions/OpenIDConnect; \
|
||||
rm -rf extensions/OpenIDConnect/.git
|
||||
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/Widgets extensions/Widgets; \
|
||||
rm -rf extensions/Widgets/.git
|
||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/Widgets; \
|
||||
rm -rf OpenIDConnect/.git
|
||||
|
||||
FROM docker.io/library/unit:php8.2
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libicu-dev librsvg2-bin imagemagick git unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN docker-php-ext-configure intl \
|
||||
libicu-dev librsvg2-bin \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install -j$(nproc) intl \
|
||||
&& docker-php-ext-install -j$(nproc) mysqli \
|
||||
&& docker-php-ext-install -j$(nproc) calendar
|
||||
&& apt-get install -y imagemagick \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder --chown=unit:unit /usr/src/mediawiki w/
|
||||
COPY --from=docker.io/composer/composer /usr/bin/composer /usr/bin/composer
|
||||
COPY composer.local.json w/composer.local.json
|
||||
|
||||
RUN cd /var/www/html/w && composer update --no-dev
|
||||
COPY --from=builder --chown=unit:unit /usr/src/mediawiki-1.42.3 w/
|
||||
COPY --from=builder --chown=unit:unit /usr/src/MobileFrontend w/extensions/MobileFrontend
|
||||
COPY --from=builder --chown=unit:unit /usr/src/PluggableAuth w/extensions/PluggableAuth
|
||||
COPY --from=builder --chown=unit:unit /usr/src/OpenIDConnect w/extensions/OpenIDConnect
|
||||
COPY --from=builder --chown=unit:unit /usr/src/Widgets w/extensions/Widgets
|
||||
|
||||
COPY config.json /docker-entrypoint.d/config.json
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
# MediaWiki OCI image
|
||||
|
||||
This MediaWiki OCI image is based on NGINX Unit and bundles several extensions, which are in use in wiki.ccchb.de.
|
||||
|
||||
## Bundled extensions
|
||||
|
||||
* MobileFrontend
|
||||
* PluggableAuth
|
||||
* OpenIDConnect
|
||||
* Widgets
|
||||
|
||||
## Ingress
|
||||
|
||||
The image exposes an HTTP service under port 80.
|
||||
The MediaWiki installation is available below `/w/` and provides article paths below the path `/wiki/`.
|
||||
A redirect at `/` is not provided by the image, and has to be implemented by the ingress.
|
||||
|
||||
## Volumes
|
||||
|
||||
It is recommended to mount a volume at `/var/www/html/w/images/` for MediaWiki uploads.
|
||||
|
||||
## Configuration
|
||||
|
||||
The MediaWiki installation expects a LocalSettings.php configuration file at the path `/var/www/html/w/LocalSettings.php`.
|
||||
|
||||
Happy helming!
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"extra": {
|
||||
"merge-plugin": {
|
||||
"include": ["extensions/*/composer.json", "skins/*/composer.json"]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,56 +8,42 @@
|
|||
{
|
||||
"match": {
|
||||
"uri": [
|
||||
"/w/index.php*",
|
||||
"/w/load.php*",
|
||||
"/w/api.php*",
|
||||
"/w/thumb.php*",
|
||||
"/w/opensearch_desc.php*",
|
||||
"/w/rest.php*",
|
||||
"/w/img_auth.php*"
|
||||
"/w/index.php",
|
||||
"/w/load.php",
|
||||
"/w/api.php",
|
||||
"/w/thumb.php",
|
||||
"/w/opensearch_desc.php",
|
||||
"/w/rest.php",
|
||||
"/w/img_auth.php",
|
||||
"/w/rest.php/*",
|
||||
"/w/mw-config/*.php"
|
||||
]
|
||||
},
|
||||
"action": {
|
||||
"pass": "applications/php_app/direct"
|
||||
"pass": "applications/php_app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"uri": [
|
||||
"!*.php",
|
||||
"/w/images/*",
|
||||
"/w/resources/assets/*",
|
||||
"/w/resources/lib/*",
|
||||
"/w/resources/src/*",
|
||||
"/w/extensions/*",
|
||||
"/w/skins/*"
|
||||
"/w/skins/*",
|
||||
"favicon.ico"
|
||||
]
|
||||
},
|
||||
"action": {
|
||||
"share": "/var/www/html$uri"
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"uri": ["/wiki/*"]
|
||||
},
|
||||
"action": {
|
||||
"pass": "applications/php_app/index"
|
||||
}
|
||||
}
|
||||
],
|
||||
"applications": {
|
||||
"php_app": {
|
||||
"type": "php",
|
||||
"targets": {
|
||||
"direct": {
|
||||
"root": "/var/www/html"
|
||||
},
|
||||
"index": {
|
||||
"root": "/var/www/html",
|
||||
"script": "w/index.php"
|
||||
}
|
||||
}
|
||||
"root": "/var/www/html"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue