Redesign mediawiki container
This commit is contained in:
parent
02c87e4534
commit
c781d79ed2
2 changed files with 75 additions and 10 deletions
|
@ -1,17 +1,34 @@
|
||||||
FROM alpine AS builder
|
FROM alpine AS builder
|
||||||
|
|
||||||
ADD https://extdist.wmflabs.org/dist/extensions/MobileFrontend-REL1_42-a9969ab.tar.gz /usr/src/
|
WORKDIR /usr/src
|
||||||
RUN tar -xz -C /usr/src -f /usr/src/MobileFrontend-REL1_42-a9969ab.tar.gz
|
|
||||||
|
|
||||||
ADD https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_42-b35addc.tar.gz /usr/src/
|
ADD https://releases.wikimedia.org/mediawiki/1.42/mediawiki-1.42.3.tar.gz .
|
||||||
RUN tar -xz -C /usr/src -f /usr/src/PluggableAuth-REL1_42-b35addc.tar.gz
|
RUN tar -xzf mediawiki-1.42.3.tar.gz
|
||||||
|
|
||||||
ADD https://extdist.wmflabs.org/dist/extensions/OpenIDConnect-REL1_42-83024de.tar.gz /usr/src/
|
ADD https://extdist.wmflabs.org/dist/extensions/MobileFrontend-REL1_42-8a4ecb7.tar.gz .
|
||||||
RUN tar -xz -C /usr/src -f /usr/src/OpenIDConnect-REL1_42-83024de.tar.gz
|
RUN tar -xzf MobileFrontend-REL1_42-8a4ecb7.tar.gz
|
||||||
|
|
||||||
FROM docker.io/mediawiki:1.42.3-fpm-alpine
|
ADD https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_42-b35addc.tar.gz .
|
||||||
|
RUN tar -xzf PluggableAuth-REL1_42-b35addc.tar.gz
|
||||||
|
|
||||||
COPY --from=builder --chown=www-data:www-data /usr/src/MobileFrontend extensions/MobileFrontend
|
ADD https://extdist.wmflabs.org/dist/extensions/OpenIDConnect-REL1_42-83024de.tar.gz .
|
||||||
COPY --from=builder --chown=www-data:www-data /usr/src/PluggableAuth extensions/PluggableAuth
|
RUN tar -xzf OpenIDConnect-REL1_42-83024de.tar.gz
|
||||||
COPY --from=builder --chown=www-data:www-data /usr/src/OpenIDConnect extensions/OpenIDConnect
|
|
||||||
|
|
||||||
|
FROM docker.io/library/unit:php8.2
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libicu-dev \
|
||||||
|
&& docker-php-ext-configure intl \
|
||||||
|
&& docker-php-ext-install -j$(nproc) intl
|
||||||
|
RUN docker-php-ext-configure mysqli \
|
||||||
|
&& docker-php-ext-install -j$(nproc) mysqli
|
||||||
|
RUN apt-get install -y imagemagick
|
||||||
|
|
||||||
|
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 config.json /docker-entrypoint.d/config.json
|
||||||
|
|
48
mediawiki/config.json
Normal file
48
mediawiki/config.json
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"listeners": {
|
||||||
|
"*:80": {
|
||||||
|
"pass": "routes"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"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/rest.php/*",
|
||||||
|
"/w/mw-config/*.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"pass": "applications/php_app"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": {
|
||||||
|
"uri": [
|
||||||
|
"/w/images/*",
|
||||||
|
"/w/resources/assets/*",
|
||||||
|
"/w/resources/lib/*",
|
||||||
|
"/w/resources/src/*",
|
||||||
|
"/w/extensions/*",
|
||||||
|
"/w/skins/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"share": "/var/www/html$uri"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"applications": {
|
||||||
|
"php_app": {
|
||||||
|
"type": "php",
|
||||||
|
"root": "/var/www/html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue