wiki.techinc.nl/docker-compose.yml
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

51 lines
1.7 KiB
YAML

# Please see DEVELOPERS.md for help
#
# Contributions to this file are welcome but please note that this file is
# minimal by design, with the idea to make it easily extensible via
# docker-compose.override.yml. For help with doing that, please see
# DEVELOPERS.md
version: '3.7'
services:
mediawiki:
image: docker-registry.wikimedia.org/dev/stretch-php72-fpm:2.0.0
user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
volumes:
- ./:/var/www/html/w:cached
env_file:
- '.env'
environment:
COMPOSER_CACHE_DIR: '/var/www/html/w/cache/composer'
MW_SERVER: 'http://localhost:${MW_DOCKER_PORT:-8080}'
MW_SCRIPT_PATH: '${MW_SCRIPT_PATH:-/w}'
MW_DBPATH: '/var/www/html/w/cache/sqlite'
MW_DBTYPE: 'sqlite'
MW_LANG: 'en'
MW_USER: '${MEDIAWIKI_USER:-Admin}'
MW_PASS: '${MEDIAWIKI_PASSWORD:-dockerpass}'
MW_SITENAME: 'MediaWiki'
MW_LOG_DIR: /var/www/html/w/cache
XDEBUG_CONFIG: '${XDEBUG_CONFIG}'
XDEBUG_ENABLE: '${XDEBUG_ENABLE:-true}'
XHPROF_ENABLE: '${XHPROF_ENABLE:-true}'
mediawiki-web:
image: docker-registry.wikimedia.org/dev/stretch-apache2:1.0.0-s1
user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
ports:
- "${MW_DOCKER_PORT:-8080}:8080"
volumes:
- ./:/var/www/html/w:cached
env_file:
- '.env'
environment:
MW_LOG_DIR: /var/www/html/w/cache
mediawiki-jobrunner:
image: docker-registry.wikimedia.org/dev/stretch-php72-jobrunner:2.0.0
user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
volumes:
- ./:/var/www/html/w:cached
env_file:
- '.env'
environment:
MW_LOG_DIR: /var/www/html/w/cache
MW_INSTALL_PATH: /var/www/html/w