-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
122 lines (116 loc) · 3.12 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# MediaWiki with MariaDB, Redis and ElasticSearch
version: '3.8'
services:
mediawiki:
image: mediawiki:1.35
container_name: wiki
depends_on:
- database
- redis
- elastic-master
- elastic-replica
build:
context: "./"
dockerfile: Dockerfile
environment:
- NETWORK: proxy
- VIRTUAL_HOST: $DOMAINS
- LETSENCRYPT_HOST: $DOMAINS
- LETSENCRYPT_EMAIL: $LETSENCRYPT_EMAIL
restart: always
ports:
- 80
- 443
networks:
- wiki-internal
- proxy
volumes:
- ./images:/var/www/html/images
# After initial setup, download LocalSettings.php and extensions to the same directory
# (e.g. docker cp wiki:/var/www/html/LocalSettings.php ./ ) as this yaml and uncomment
# the following lines and use compose to restart the mediawiki service
# - ./config/LocalSettings.php:/var/www/html/LocalSettings.php
# - ./extensions:/var/www/html/extensions/
database:
container_name: wiki_db
image: mariadb
restart: always
networks:
wiki-internal:
ipv4_address: 10.0.1.3
volumes:
- ./db:/var/lib/mysql
# - ./config/db:/etc/mysql/conf.d
environment:
# @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
MYSQL_DATABASE: wiki
MYSQL_USER: wikiuser
MYSQL_PASSWORD: wikipassword
MYSQL_ROOT_PASSWORD: wikirootpassword
redis:
image: "redis:6.2"
container_name: redis-wiki
command: redis-server # command: redis-server /usr/local/etc/redis/redis.conf --save 60 1 --loglevel warning
ports:
- "6379:6379"
#volumes:
# - ./config/redis:/usr/local/etc/redis
networks:
- wiki-internal
restart: always
elastic-master:
image: elasticsearch:6.8.20
container_name: elasticsearch-master-wiki
restart: always
environment:
- node.name=es-master
- cluster.name=docker-cluster
#- discovery.seed_hosts=es02,es03
#- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./elastic_data_master:/usr/share/elasticsearch/data:rw
ports:
- 9200:9200
networks:
wiki-internal:
ipv4_address: 10.0.1.4
elastic-replica:
image: elasticsearch:6.8.20
container_name: elastic-replica
restart: always
environment:
- node.name=es-replica
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elastic-master"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./elastic_data_replica:/usr/share/elasticsearch/data:rw
networks:
wiki-internal:
ipv4_address: 10.0.1.5
networks:
proxy:
external: true
wiki-internal:
driver: bridge
ipam:
config:
- subnet: 10.0.1.0/24
gateway: 10.0.1.1