-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-dev
225 lines (170 loc) · 7.98 KB
/
Dockerfile-dev
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# 미디어 위키 버전 설정
# 참고
# - https://github.com/wikimedia/mediawiki-docker/blob/master/dev/Dockerfile
# - https://github.com/wikimedia/mediawiki-docker/blob/master/{VERSION}/Dockerfile
ARG MEDIAWIKI_MAJOR_VERSION=1.34
ARG MEDIAWIKI_BRANCH=REL1_34
ARG MEDIAWIKI_VERSION=1.34.1
ARG MEDIAWIKI_SHA512=3a03ac696e2d5300faba0819ba0d876a21798c8dcdc64cc2792c6db0aa81d4feaced8dc133b6ca3e476c770bf51516b0a624cb336784ae3d2b51c8c0aa5987a0
FROM hywiki/base
# Set timezone
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ARG MEDIAWIKI_MAJOR_VERSION
ARG MEDIAWIKI_BRANCH
ARG MEDIAWIKI_VERSION
ARG MEDIAWIKI_SHA512
# MediaWiki setup
RUN set -eux; \
mkdir -p /usr/src; \
cd /tmp; \
curl -fSL "https://releases.wikimedia.org/mediawiki/${MEDIAWIKI_MAJOR_VERSION}/mediawiki-${MEDIAWIKI_VERSION}.tar.gz" -o mediawiki.tar.gz; \
echo "${MEDIAWIKI_SHA512} *mediawiki.tar.gz" | sha512sum -c -; \
tar -xzf mediawiki.tar.gz --strip-components=1 --directory /usr/src/; \
rm mediawiki.tar.gz;
# Extension Install
RUN git clone -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor.git \
/usr/src/extensions/VisualEditor \
&& cd /usr/src/extensions/VisualEditor \
&& git submodule update --init
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend \
/usr/src/extensions/MobileFrontend
RUN git clone https://github.com/somadeaki/RestrictEmailDomain.git \
/usr/src/extensions/RestrictEmailDomain
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateStyles \
/usr/src/extensions/TemplateStyles
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/SwiftMailer \
/usr/src/extensions/SwiftMailer
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/UserMerge \
/usr/src/extensions/UserMerge
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/ContributionScores \
/usr/src/extensions/ContributionScores
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/CleanChanges \
/usr/src/extensions/CleanChanges
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Babel \
/usr/src/extensions/Babel
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/cldr \
/usr/src/extensions/cldr
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/ContentTranslation \
/usr/src/extensions/ContentTranslation
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/UniversalLanguageSelector.git \
/usr/src/extensions/UniversalLanguageSelector
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Translate \
/usr/src/extensions/Translate
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof \
/usr/src/extensions/AntiSpoof
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror \
/usr/src/extensions/CodeMirror
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Description2 \
/usr/src/extensions/Description2
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/DisableAccount \
/usr/src/extensions/DisableAccount
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Disambiguator \
/usr/src/extensions/Disambiguator
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo \
/usr/src/extensions/Echo
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Josa \
/usr/src/extensions/Josa
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify \
/usr/src/extensions/LoginNotify
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenGraphMeta \
/usr/src/extensions/OpenGraphMeta
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData \
/usr/src/extensions/TemplateData
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateSandbox \
/usr/src/extensions/TemplateSandbox
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateWizard \
/usr/src/extensions/TemplateWizard
## for Graph Extensions
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/JsonConfig \
/usr/src/extensions/JsonConfig
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Graph \
/usr/src/extensions/Graph
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/HitCounters \
/usr/src/extensions/HitCounters
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/BetaFeatures \
/usr/src/extensions/BetaFeatures
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/CommonsMetadata \
/usr/src/extensions/CommonsMetadata
##
# Skins
##
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue \
/usr/src/skins/MinervaNeue
###
# Non Wikimedia Repository
###
RUN git clone --depth 1 \
https://github.com/edwardspec/mediawiki-aws-s3.git \
/usr/src/extensions/AWS
RUN git clone --depth 1 \
https://gitlab.com/hydrawiki/extensions/EmbedVideo.git \
/usr/src/extensions/EmbedVideo
RUN git clone --depth 1 -b sentry-v2 \
https://github.com/hy-lionlab/mediawiki-extensions-Sentry.git \
/usr/src/extensions/Sentry
RUN git clone --depth 1 -b notosans-kr \
https://github.com/hy-lionlab/mediawiki-extensions-Mpdf.git \
/usr/src/extensions/Mpdf
# COPY Resources
COPY --chown=www-data:www-data resources /usr/src/resources/
# Change owner
RUN chown -R www-data:www-data /usr/src
# AWS Composer Installation
RUN cd /usr/src/extensions/AWS && sudo -u www-data COMPOSER_CACHE_DIR=/dev/null composer install --no-dev
# SwiftMailer Composer Installation
RUN cd /usr/src/extensions/SwiftMailer && sudo -u www-data COMPOSER_CACHE_DIR=/dev/null composer install --no-dev
# AntiSpoof Composer Installation
RUN cd /usr/src/extensions/AntiSpoof && sudo -u www-data COMPOSER_CACHE_DIR=/dev/null composer install --no-dev
# MPdf Composer Installation
RUN cd /usr/src/extensions/Mpdf && sudo -u www-data COMPOSER_CACHE_DIR=/dev/null composer install --no-dev
# Sentry Composer Installation
RUN cd /usr/src/extensions/Sentry && sudo -u www-data COMPOSER_CACHE_DIR=/dev/null composer install --no-dev
# Maps Extension Installation
RUN cd /usr/src && COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~7.0 && composer update mediawiki/maps --no-dev -o
# PHP & Apache Configure
COPY php/php.ini /usr/local/etc/php/conf.d/mediawiki.ini
COPY php/opcache-recommended.ini /usr/local/etc/php/conf.d/opcache-recommended.ini
COPY php/www.conf /usr/local/etc/php-fpm.d/www.conf
# HWP MIME Type Support
# 참고 https://www.mediawiki.org/wiki/Manual:MIME_type_detection
RUN echo "application/x-hwp hwp" >> /usr/src/includes/libs/mime/mime.types
RUN echo "application/haansofthwp hwp" >> /usr/src/includes/libs/mime/mime.types
RUN echo "application/vnd.hancom.hwp hwp" >> /usr/src/includes/libs/mime/mime.types
RUN echo "application/x-hwp application/haansofthwp application/vnd.hancom.hwp [OFFICE]" >> /usr/src/includes/libs/mime/mime.info
VOLUME /ct
COPY run /usr/local/bin/
RUN chmod 755 /usr/local/bin/run
WORKDIR /usr/src
EXPOSE 9000
CMD ["/usr/local/bin/run"]