Commit graph

28 commits

Author SHA1 Message Date
Bryan Davis
9affb6b447 dev(docker): Bump mediawiki-web container to dev/bookworm-apache2:1.0.1
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)
2025-01-07 17:02:36 +00:00
Daimona Eaytoy
bbc92f5b6f docker: Switch to Debian Bookworm and PHP 8.3
Use the new images added in
https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/69
(virtual Depends-On).

Bug: T381728
Change-Id: I2565ba157d70fd5493a351dbdbfcabc0a164e60b
(cherry picked from commit 7b70ac147fcc71247136f974597133b29af96aea)
2024-12-19 19:24:01 +00:00
Novem Linguae
6ba8efd0a7 docker-compose.yml: Remove obsolete version element
Fixes "WARN[0000] docker-compose.yml: `version` is obsolete"

See https://docs.docker.com/compose/compose-file/04-version-and-name/

Bug: T364815
Change-Id: I0f42a2a52f65f9dda89ae12b2041f31223b7c4cf
2024-05-14 07:49:57 +00:00
James D. Forrester
1ae4ead71f docker: Update apache2 image to one with a /view rewrite rule
Bug: T338190
Change-Id: I191f7733443df94644877b4d97827b33a3befbef
2023-07-20 15:32:51 -04:00
Brennen Bearnes
c1be006203 docker: update to latest published images
Updates docker-compose.yml to the most recent published versions of the
following:

  - docker-registry.wikimedia.org/dev/buster-apache2:2.0.0-s2
  - docker-registry.wikimedia.org/dev/buster-php81-fpm:1.0.1-s2
  - docker-registry.wikimedia.org/dev/buster-php81-jobrunner:1.0.1-s2

Follows up on a string of recent dev-images changes:

  - https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/36
  - https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/39
  - https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/40
  - https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/41
  - https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/42

I've tested these to the extent of:

  $ docker compose up -d

Followed by some clicking around on http://localhost:8080 - I haven't
tested jobrunners or xdebug.

Bug: T338208
Change-Id: I3b82b9fdca9c9424c82f5971e31d2cb467622826
2023-07-07 12:57:25 -06:00
Bryan Davis
9c12473f3b docker-compose: Add MW_DOCKER_PORT explicitly to environment
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
2023-04-12 15:37:41 -06:00
James D. Forrester
5c7a1f1da6 MediaWiki-Docker: Switch PHP images to PHP 8.1
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
2022-12-15 07:31:23 +00:00
Brennen Bearnes
1851294c34 docker: update to latest published images
Bug: T306802
Change-Id: I62f236f54e21b9b8a8f6660f49922ff871b87949
2022-09-27 15:10:05 -06:00
James D. Forrester
f8120e966b MediaWiki-Docker: Switch PHP images to PHP7.4
This way they work 'out-of-the-box' with release branches.

Bug: T295958
Bug: T278847
Change-Id: Ifa0b3d28b81f9d9e351e452f766c9bcb165f4a36
2022-08-09 19:29:52 +00:00
James D. Forrester
1b64018fdc MediaWiki-Docker: Upgrade buster-apache2 image to latest
Follows-up on https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/13.

Bug: T305143
Change-Id: I52c4bd71ada9e605730290fc29f94e2b256543c3
2022-08-09 19:26:14 +00:00
Timo Tijhof
58fe6328cc docker: Update dev images to newer version with Composer 2.x
Ref https://gitlab.wikimedia.org/releng/dev-images/-/merge_requests/7.

Bug: T279857
Change-Id: Ie113f7a6b70edecbdabe1774f79e88ebd8f92151
2021-10-23 02:21:33 +01:00
Timo Tijhof
d2a8c94d6b MediaWiki-Docker: Remove injection of MW_SCRIPT_PATH
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
2021-09-11 22:32:58 +00:00
James D. Forrester
cbd6e2a422 [docker] Switch default images from stretch to buster
Keeping at php72 for now, for the smallest possible change.

Bug: T273100
Change-Id: I6349654249d7b42a1e9cafdd1576a678c6e71091
2021-08-17 17:10:51 -07:00
physikerwelt (Moritz Schubotz)
311c976d50
Update stretch-php72-fpm im MediaWiki-Docker to 3.0.0
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
2021-07-12 10:45:30 +02:00
Kosta Harlan
05fbe68df9 [docker] Set user/group mapping for all host OS, not just Linux
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
2021-01-29 19:34:01 +01:00
Brennen Bearnes
1f266a692b [docker] split php-fpm and apache containers
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
2021-01-26 15:09:39 -07:00
Brennen Bearnes
efaf43a029 [docker] Use image that anchors MW_SCRIPT_PATH regex
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
2020-11-18 11:49:31 -07:00
Kosta Harlan
002f50d4fc [docker] Update working directory to /var/www/html/w
Also documents configuration changes in DEVELOPERS.md.

Depends-On: I5b0ac1cbb1d1a2381eff757a1903bce2dacf09d0
Depends-On: I3d967b610a032625318c5a2d233254f7e7ccbf13
Bug: T261051
Bug: T262392
Change-Id: I7801f549c887952f5d092651c2543ace6d56e909
2020-10-01 09:18:16 +00:00
Brennen Bearnes
1b8bb8bdf3 docker compose: update to stretch-php72-fpm-apache2-xdebug 0.5.0
Allows for article path customization.

Bug: T257044
Depends-on: Idf33d1f431f2936eda4a221c4418d7d5d863b352
Change-Id: I618e72fdea51a26f8fa00b154aadc5a9ab4a2976
2020-07-24 17:16:55 -06:00
Brennen Bearnes
c9efaadd00 mediawiki-docker: Add a jobrunner container
- 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
2020-06-17 13:34:55 +00:00
Kosta Harlan
0853b9f85c [docker] Use install.sh, add instructions for same
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
2020-04-04 21:26:39 +00:00
jenkins-bot
28f959c5ca Merge "[docker] Use a .env file for setting the port and user" 2020-04-01 16:16:30 +00:00
Kosta Harlan
c27eda79a0 [docker] Use a .env file for setting the port and user
- 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
2020-04-01 17:29:14 +02:00
Brennen Bearnes
f789a48fd0 docker: Bump image version to increase upload size
Bug: T246930
Depends-On: I6562f8fece46743fddd512f9c391f7778ad59f3c
Change-Id: I05df6da52f4744302eb10d0d9b243e28a6be6dcd
2020-03-04 15:42:09 -07:00
jenkins-bot
f7c24dc564 Merge "[docker] Bump base image to 0.1.0" 2020-03-03 18:57:00 +00:00
Kosta Harlan
71ccea79f5 [docker] Set log directory by default
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
2020-02-29 21:43:59 +01:00
Kosta Harlan
4fe4bb5959 [docker] Bump base image to 0.1.0
* Add support for profiling with Tideways XHProf extension

Depends-On: Ic80a6e3a433bbb9535ec99caa82ef0b36f13b3f2
Bug: T246202
Change-Id: Ia7bf473e2807bb2d84af76ae7293e5d3a539573e
2020-02-26 11:25:58 +01:00
Kosta Harlan
89083ea868 Add configuration for Docker based development environment
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
2020-02-21 10:09:48 +00:00