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
|
RUN apk update && apk add git
|
||||||
|
|
||||||
ADD https://releases.wikimedia.org/mediawiki/1.42/mediawiki-1.42.3.tar.gz .
|
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; \
|
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/PluggableAuth; \
|
||||||
rm -rf extensions/MobileFrontend/.git
|
rm -rf PluggableAuth/.git
|
||||||
|
|
||||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/PluggableAuth extensions/PluggableAuth; \
|
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect; \
|
||||||
rm -rf extensions/PluggableAuth/.git
|
rm -rf OpenIDConnect/.git
|
||||||
|
|
||||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect extensions/OpenIDConnect; \
|
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/Widgets; \
|
||||||
rm -rf extensions/OpenIDConnect/.git
|
rm -rf OpenIDConnect/.git
|
||||||
|
|
||||||
RUN git clone -b REL1_42 https://gerrit.wikimedia.org/r/mediawiki/extensions/Widgets extensions/Widgets; \
|
|
||||||
rm -rf extensions/Widgets/.git
|
|
||||||
|
|
||||||
FROM docker.io/library/unit:php8.2
|
FROM docker.io/library/unit:php8.2
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libicu-dev librsvg2-bin imagemagick git unzip \
|
libicu-dev librsvg2-bin \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& docker-php-ext-configure intl \
|
||||||
|
|
||||||
RUN docker-php-ext-configure intl \
|
|
||||||
&& docker-php-ext-install -j$(nproc) intl \
|
&& docker-php-ext-install -j$(nproc) intl \
|
||||||
&& docker-php-ext-install -j$(nproc) mysqli \
|
&& 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=builder --chown=unit:unit /usr/src/mediawiki-1.42.3 w/
|
||||||
COPY --from=docker.io/composer/composer /usr/bin/composer /usr/bin/composer
|
COPY --from=builder --chown=unit:unit /usr/src/MobileFrontend w/extensions/MobileFrontend
|
||||||
COPY composer.local.json w/composer.local.json
|
COPY --from=builder --chown=unit:unit /usr/src/PluggableAuth w/extensions/PluggableAuth
|
||||||
|
COPY --from=builder --chown=unit:unit /usr/src/OpenIDConnect w/extensions/OpenIDConnect
|
||||||
RUN cd /var/www/html/w && composer update --no-dev
|
COPY --from=builder --chown=unit:unit /usr/src/Widgets w/extensions/Widgets
|
||||||
|
|
||||||
COPY config.json /docker-entrypoint.d/config.json
|
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": {
|
"match": {
|
||||||
"uri": [
|
"uri": [
|
||||||
"/w/index.php*",
|
"/w/index.php",
|
||||||
"/w/load.php*",
|
"/w/load.php",
|
||||||
"/w/api.php*",
|
"/w/api.php",
|
||||||
"/w/thumb.php*",
|
"/w/thumb.php",
|
||||||
"/w/opensearch_desc.php*",
|
"/w/opensearch_desc.php",
|
||||||
"/w/rest.php*",
|
"/w/rest.php",
|
||||||
"/w/img_auth.php*"
|
"/w/img_auth.php",
|
||||||
|
"/w/rest.php/*",
|
||||||
|
"/w/mw-config/*.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"pass": "applications/php_app/direct"
|
"pass": "applications/php_app"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"match": {
|
"match": {
|
||||||
"uri": [
|
"uri": [
|
||||||
"!*.php",
|
|
||||||
"/w/images/*",
|
"/w/images/*",
|
||||||
"/w/resources/assets/*",
|
"/w/resources/assets/*",
|
||||||
"/w/resources/lib/*",
|
"/w/resources/lib/*",
|
||||||
"/w/resources/src/*",
|
"/w/resources/src/*",
|
||||||
"/w/extensions/*",
|
"/w/extensions/*",
|
||||||
"/w/skins/*"
|
"/w/skins/*",
|
||||||
|
"favicon.ico"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"share": "/var/www/html$uri"
|
"share": "/var/www/html$uri"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"match": {
|
|
||||||
"uri": ["/wiki/*"]
|
|
||||||
},
|
|
||||||
"action": {
|
|
||||||
"pass": "applications/php_app/index"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"applications": {
|
"applications": {
|
||||||
"php_app": {
|
"php_app": {
|
||||||
"type": "php",
|
"type": "php",
|
||||||
"targets": {
|
"root": "/var/www/html"
|
||||||
"direct": {
|
|
||||||
"root": "/var/www/html"
|
|
||||||
},
|
|
||||||
"index": {
|
|
||||||
"root": "/var/www/html",
|
|
||||||
"script": "w/index.php"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue