forked from addshore/mediawiki-docker-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
101 lines (92 loc) · 2.84 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '2.2'
services:
db-master:
image: ${DB}:latest
environment:
- MYSQL_ROOT_PASSWORD=toor
volumes:
- sql-data-master:/var/lib/mysql
- ./config/mysql/master:/tmp/mwdd
entrypoint: "/tmp/mwdd/entrypoint.sh"
command: "mysqld"
db-slave:
image: ${DB}:latest
environment:
- MYSQL_ROOT_PASSWORD=toor
volumes:
- sql-data-slave:/var/lib/mysql
- ./config/mysql/slave:/tmp/mwdd
entrypoint: "/tmp/mwdd/entrypoint.sh"
command: "mysqld"
db-configure:
image: ${DB}:latest
environment:
- "MYSQL_SLAVE_PASSWORD=toor"
- "MYSQL_MASTER_PASSWORD=toor"
- "MYSQL_ROOT_PASSWORD=toor"
- "MYSQL_REPLICATION_USER=repl"
- "MYSQL_REPLICATION_PASSWORD=repl"
depends_on:
- db-master
- db-slave
volumes:
- ./scripts/mysql_connector.sh:/tmp/mysql_connector.sh
- ./scripts/wait-for-it.sh:/tmp/wait-for-it.sh
command: /bin/bash -x /tmp/mysql_connector.sh
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_USER:root
- PMA_PASSWORD:toor
- PMA_HOSTS=db-master,db-slave
- PMA_ARBITRARY=1
- VIRTUAL_HOST=phpmyadmin.mw.localhost
volumes:
- ./config/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
web:
image: webdevops/php-${WEBSERVER}-dev:${RUNTIMEVERSION}
environment:
- WEB_DOCUMENT_ROOT=/var/www
# Used by various maintenance scripts to find MediaWiki.
# Also required for /var/www/index.php - https://phabricator.wikimedia.org/T153882
- MW_INSTALL_PATH=/var/www/mediawiki
- VIRTUAL_HOST=*.web.mw.localhost
- PHP_DEBUGGER=xdebug
- XDEBUG_REMOTE_AUTOSTART=${XDEBUG_REMOTE_AUTOSTART}
- XDEBUG_REMOTE_HOST=${IDELOCALHOST}
- XDEBUG_REMOTE_PORT=9000
- XDEBUG_REMOTE_CONNECT_BACK=0
- XDEBUG_PROFILER_ENABLE_TRIGGER=1
- PHP_IDE_CONFIG=serverName=docker
- PHP_UPLOAD_MAX_FILESIZE=1024M
- PHP_POST_MAX_SIZE=1024M
depends_on:
- db-configure
volumes:
- "${DOCKER_MW_PATH}:/var/www/mediawiki:cached"
- ./config/mediawiki:/var/www/mediawiki/.docker:ro
- ./scripts/wait-for-it.sh:/srv/wait-for-it.sh:ro
- mw-images:/var/www/mediawiki/images/docker:delegated
graphite-statsd:
image: hopsoft/graphite-statsd
environment:
- VIRTUAL_HOST=graphite.mw.localhost
volumes:
- graphite-data:/opt/graphite/storage
nginx-proxy:
image: jwilder/nginx-proxy
environment:
- VIRTUAL_HOST=proxy.mw.localhost
ports:
- "${DOCKER_MW_PORT}:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./config/nginx/client_max_body_size.conf:/etc/nginx/conf.d/client_max_body_size.conf:ro
- ./config/nginx/timeouts.conf:/etc/nginx/conf.d/timeouts.conf:ro
redis:
image: redis
volumes:
sql-data-master:
sql-data-slave:
graphite-data:
mw-images: