"Mediawiki Docker Compose"의 두 판 사이의 차이

(새 문서: ==개요== <syntaxhighlight lang='yaml'> ## https://hub.docker.com/_/mediawiki # MediaWiki with MariaDB # # Access via "http://localhost:8080" # (or "http://$(docker-machine ip):80...)
 
 
(같은 사용자의 중간 판 8개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;Mediawiki Docker Compose
;미디어위키 도커 컴포즈


==apache + mariadb==
* 출처: https://hub.docker.com/_/mediawiki
<syntaxhighlight lang='yaml'>
<syntaxhighlight lang='yaml'>
## https://hub.docker.com/_/mediawiki
# MediaWiki with MariaDB
# MediaWiki with MariaDB
#
#
33번째 줄: 36번째 줄:
</syntaxhighlight>
</syntaxhighlight>


==php-fpm + apache + jobrunner==
* 출처: https://github.com/wikimedia/mediawiki/blob/master/docker-compose.yml
* DB: php-fpm 내부에 sqlite
<syntaxhighlight lang='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
</syntaxhighlight>
==docker-compose.override.yml==
* https://www.mediawiki.org/wiki/MediaWiki-Docker/Configuration_recipes/Example_docker-compose.override.yml_file
<syntaxhighlight lang='yaml'>
version: '3.7'
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
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[ ]]
* [[미디어위키]]
* [[ ]]
* [[도커 컴포즈]]
* [[ ]]
* [[미디어위키 도커 레지스트리]]
* [[  ]]
* [[  ]]
* [[  ]]


==참고==
==참고==
* {{위키백과}}
* https://github.com/wikimedia/mediawiki-containers
* {{위키낱말사전}}
* {{다음사전}}
* {{다음백과}}
* {{네이버사전}}
* {{네이버백과}}
* {{나무위키}}
* {{리브레위키}}


[[분류:   ]]
[[분류: 미디어위키]]
[[분류:   ]]
[[분류: docker]]

2021년 8월 21일 (토) 20:43 기준 최신판

1 개요[ | ]

Mediawiki Docker Compose
미디어위키 도커 컴포즈

2 apache + mariadb[ | ]

yaml
Copy
# MediaWiki with MariaDB
#
# Access via "http://localhost:8080"
#   (or "http://$(docker-machine ip):8080" if using docker-machine)
version: '3'
services:
  mediawiki:
    image: mediawiki
    restart: always
    ports:
      - 8080:80
    links:
      - database
    volumes:
      - /var/www/html/images
      # After initial setup, download LocalSettings.php to the same directory as
      # this yaml and uncomment the following line and use compose to restart
      # the mediawiki service
      # - ./LocalSettings.php:/var/www/html/LocalSettings.php
  database:
    image: mariadb
    restart: always
    environment:
      # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
      MYSQL_DATABASE: my_wiki
      MYSQL_USER: wikiuser
      MYSQL_PASSWORD: example
      MYSQL_RANDOM_ROOT_PASSWORD: 'yes'

3 php-fpm + apache + jobrunner[ | ]

yaml
Copy
# 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

4 docker-compose.override.yml[ | ]

yaml
Copy
version: '3.7'
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

5 같이 보기[ | ]

6 참고[ | ]