Manage services
Releasev0.35.0 · cfeceb67
Watch it in action
Services share common lifecycle commands. For example:
mw dev memcached createmw dev memcached stopmw dev memcached startmw dev memcached destroydestroy removes containers and service data. Use stop to keep data for later. Some services also provide tools such as mw dev mediawiki composer, fresh and quibble, or mw dev redis redis-cli. Check mw dev SERVICE --help for the commands available.
For optional OpenSearch Dashboards log browsing, see local logs.
Inspect configuration
Section titled “Inspect configuration”Show the generated Compose configuration or inspect a service’s source file:
mw dev compose configcat "$(mw dev where)/compose/memcached/compose.yml"Change environment variables
Section titled “Change environment variables”Set a context variable and recreate the affected service to apply it:
mw dev env set MEDIAWIKI_XDEBUG_CONFIG "client_host=172.21.112.105"mw dev mediawiki createUse the address of your debugger. See PHP debugging for more examples.
Select an image
Section titled “Select an image”Inspect the current image, or select a compatible replacement:
mw dev mediawiki image getmw dev mediawiki image set REGISTRY/IMAGE:TAGmw dev mediawiki createReset the override with mw dev mediawiki image reset, then recreate the service. See custom Dockerfiles to build your own image and apply changes with rebuild.
Stop and resume an environment
Section titled “Stop and resume an environment”mw dev stop (alias suspend) records the running services before stopping them. mw dev start (alias resume) resumes that saved set. Services stopped beforehand and completed one-shot setup containers stay stopped. Repeating stop preserves the record; repeating start with nothing left to resume is a no-op.
Service create/start/stop/destroy commands update an existing record. mw dev restart targets running services; global destroy removes the record. Direct Docker or Compose commands bypass this tracking. State is separate for each context.
An older context with no saved stop record initially starts its exited or created services. Its first global stop establishes the selective resume set.
For a quick environment check, inspect the Compose services and recent web logs after starting:
mw dev startmw dev compose psmw dev compose logs -- --tail=20 mediawiki-webUse mw dev restart to restart the currently running services. mw dev stop preserves the service set so mw dev start can resume it later.
Read this guide offline with mw help guides dev services.
Adapted from MediaWiki.org under CC BY-SA 4.0; see the linked page history for contributors.
Page views: —Sessions: —