Update the image used by the mediawiki-web container to the newly built
dev/bookworm-apache2:1.0.1 which includes an Apache2 config change to
make the container work better under a qemu runtime emulating AMD64.
This should be a noop change for other clients.
Bug: T382709
Change-Id: I6f9833af38e2e0d07b5c0a696e604a594db94127
(cherry picked from commit dbc68e8cb477c30f25c9037ebd4dc0eda0a4de5e)
Add explicit MW_DOCKER_PORT settings to the `environment` data for the
mediawiki and mediawiki-web services. Both services had existing
configuration referencing a MW_DOCKER_PORT variable, but some
docker-compose compatible runtimes were ignoring this envvar without it
also being explicitly mapped in the environment data.
Change-Id: I4ee19e56b8bf8564a412e9dd352dfc7aa8882920
This should now be the default target for people to develop upon.
Images were added in GitLab via this Merge Request which I can't make
this patch depend upon:
https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/23
Bug: T319432
Change-Id: Iaa61c0f382244241c8fde10b8fa419f1f5730477
Injecting it does nothing other than break the wiki with 404 errors.
The only thing that uses it is the install.sh script, which then
one-time substitutes it in LocalSettings.php.
It isn't used by the mount logic for /var/www/w, and it isn't used
by the Apache config in the referenced Docker images either.
While the injection is removed, I have kept the following two:
1. It is still set for the docker images so that the env variable
can still be read, to allow new additions to the dev images to
not have to hardcode it, and to perhaps one day actually support
this. It seems useful to retain as abstraction layer from that
perspective.
2. It is still part of the recommended `.env` file. For the same reason
as the previous point, but not theoretical. Our test tools (Selenium,
QUnit, fresh-node, etc.) all expect this env variable for discovery
and those tools are not specific to MediaWiki-Docker so they need
this indeed.
After this change, there remains one weak link, which is someone
copying the recommended .env file and then deciding to change
MW_SCRIPT_PATH for some reason. What will happen is that the wiki
continues to work and identify with "/w", and the only impact is
that external tooling will look for their custom path, and not find
a wiki there.
Bug: T273529
Change-Id: I4aa71f8994810ea0fbe2950958097c223c88916c
In version 2.0.0 XDebug was not if the container did run as non-root user.
DEVELOPERS.MD suggested to run as non-root user. Fortunately, the
problem was resolved in I37d0f35f0e3622a7fb3cb095d3b6b9496438ce12.
This commit updates the MediaWiki-Docker compose file to also use the fixed
container.
Bug: T273682
Change-Id: Ib10e524d8cb4f58836efe7034303357a0f20c5ac
Apparently Docker for Mac (I assume also Docker for Windows) has changed
and we now need to set the host user/group mapping to avoid permissions
problems in the running container. As a result, we don't need to make
Linux users create an override file anymore.
Also, update the docker-compose.yml to reference the `.env` file,
apparently this explicit reference is required for those values to be read.
Bug: T273218
Change-Id: Iaadce5d27d6e973ad02afd5b069646e95b5de0aa
Adds a mediawiki-web service running Apache, and changes mediawiki
service to run only PHP-FPM. Assumes users will continue to run CLI PHP
in the mediawiki container.
Passes MEDIAWIKI_USER and MEDIAWIKI_PASSWORD into the PHP container
as MW_USER and MW_PASS respectively. (The difference should be
reconciled in a future patch.) Also passes in MW_SCRIPT_PATH if set.
There's still some weirdness here in that MW_SERVER, if set in the .env,
isn't used, though MW_PORT is.
Adds instructions for XDebug 3.x, clarifies some documentation around
environment variables and Xdebug use.
See https://gerrit.wikimedia.org/r/c/releng/dev-images/+/622575
for more context.
Bug: T245444
Depends-On: I67ed53c4bd8e92a4c506da4aa7ffee79ca2910bb
Depends-On: Iab57d34b2012eb9e0271a7d4ec02053f984ccf86
Change-Id: I0cfef6f05a9237f310a85942ee881536288131ae
Bumps docker-registry.wikimedia.org/dev/stretch-php72-fpm-apache2-xdebug
from 0.6.1 to 0.6.1-s1 to avoid multiple replacements of the path on
subsequent starts of the docker-compose environment.
Depends-on: Idf25b9a9497d4eb6d8c7e6b7c97b76eb370c3136
Change-Id: Ic3a8c7d132c7ac36f52079001c2152861e26f229
- Uses new stretch-php72-jobrunner from dev-images
- Removes TimedMediaHandler-specific resource limits from general
DevelopmentSettings.php, as we're putting these in the container
PlatformSettings.php from docker entrypoints.
Bug: T246935
Bug: T246942
Depends-On: I505366b287f75581a5dd8016abbedfe61f53cb13
Change-Id: I4b4061d9cd877af34606c914942cfe0be028fff8
Updates docker-compose.yml to run stretch-php72-fpm-apache2-xdebug:0.3.0, which
will contain a /docker/install.sh. Usage is described in DEVELOPERS.md.
Depends-On: Icf7dd0e22e0421cf97de1d7c1d4a44ca14f2190a
Bug: T246953
Change-Id: Ib7e6e9b872c284583db3a5e83b310183343b4341
- allows for cleanly overriding host exposed port
- easier to override XDebug settings
- easier setup for Linux hosts
When wikimedia/fresh is updated with https://github.com/wikimedia/fresh/pull/18,
we can simplify the Selenium / API testing instructions too (removing the
`export` statements).
Bug: T246586
Bug: T246588
Change-Id: Ibd266411636ac144789617bb0999c33a83e9e652
This seems like a good default to have rather than requiring a developer to
override it via docker-compose.override.yml
It won't be used unless DevelopmentSettings.php is required in
LocalSettings.php.
Bug: T246548
Change-Id: Ia1a95ab03f3f2af8ed3e1149e0f34124af5adf06
* Add support for profiling with Tideways XHProf extension
Depends-On: Ic80a6e3a433bbb9535ec99caa82ef0b36f13b3f2
Bug: T246202
Change-Id: Ia7bf473e2807bb2d84af76ae7293e5d3a539573e
This patch introduces a simple docker-compose based development environment
with the idea to allow most development use cases for beginning and
experienced MediaWiki developers.
- PHP and Apache container with XDebug enabled
- Support for overriding services with docker-compose override file
- Documentation for usage and a documented place for sharing docker-compose
overrides and LocalSettings.php configuration snippets for e.g. MySQL,
DB replication, Redis, etc
Depends-On: I50079cca6a286d8aaea8fd0785be48c80e80271c
Bug: T238224
Change-Id: I3b76c1599b1ff32174af5603aadc9f7c7634c98b