MediaWiki-Docker/Configuration recipes/Example docker-compose.override.yml file
Appearance
Example docker-compose.override.yml
file
[edit]Below is a complete override file that provides a Redis and ElasticSearch containers, along with overriding the user mapping and the XDebug configuration for the app container.
The snippet below is just for purposes of showing a complete file. Rather than using this snippet, you probably want to pick and choose from specific recipes that are located farther down the page. |
services:
mediawiki:
# On Linux, these lines ensure file ownership is set to your host user/group
user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
environment:
# On Linux, replace "yourhostname" with the output of `hostname`
XDEBUG_CONFIG: remote_host=yourhostname
# On Linux, uncomment the next 2 lines so Xdebug configuration
# can access host.docker.internal:
#extra_hosts:
# - "host.docker.internal:host-gateway"
mediawiki-web:
# On Linux, these lines ensure file ownership is set to your host user/group
user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
# Note, adding a redis service requires changes to LocalSettings.php to work.
redis:
image: redis
# Note, adding an elasticsearch service requires changes to LocalSettings.php to work.
elasticsearch:
image: elasticsearch:6.8.2
environment:
- discovery.type=single-node
ports:
- '9200:9200'
- '9300:9300'
volumes:
- esdata:/usr/share/elasticsearch/data
volumes:
esdata:
driver: local