You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

47 lines
1.9 KiB

FROM debian:stable
RUN apt-get -y update && apt-get -y install nginx php-fpm php-mysql php-apcu php-mbstring php-xml supervisor python-pip \
mysql-client imagemagick curl wget zip unzip php-pclzip
RUN pip install supervisor-stdout
ENV MW_VERSION REL1_30
ENV MW_SOURCE https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz
ENV SMF_VERSION 2.0.15
ENV SMF_SOURCE https://download.simplemachines.org/index.php/smf_2-0-15_install.tar.gz
ENV SOURCE_ROOT /application
ENV WIKI_SOURCE $SOURCE_ROOT/w
ENV FORUMS_SOURCE $SOURCE_ROOT/forums
RUN mkdir userdata && mkdir $SOURCE_ROOT && \
mkdir $WIKI_SOURCE && mkdir $FORUMS_SOURCE
ADD configuration configuration
ADD scripts scripts
# Install composer
RUN cd /usr/src && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Clone mediawiki and SMF source into temp directory, install and then copy over to application dir
RUN cd /tmp && wget $MW_SOURCE && tar -xvf mediawiki-*.tar.gz && \
cp -Rv mediawiki-*/* $WIKI_SOURCE && rm -rf mediawiki-* && \
mkdir smf && cd smf && wget $SMF_SOURCE && tar -xvf smf_*.tar.gz && \
rm -rf Settings.php attachments smf_*.tar.gz && cp -Rv * $FORUMS_SOURCE
# Install additional extensions
RUN ./add_extension.sh FlaggedRevs $MW_VERSION && \
./add_extension.sh CheckUser $MW_VERSION && \
./add_extension.sh Contributors $MW_VERSION
RUN chown -R www-data:www-data /application
ADD --chown=www-data:www-data application application
RUN cd $WIKI_SOURCE && composer update --no-dev
RUN ln -sf /configuration/supervisord.conf /etc/supervisor/supervisord.conf && \
ln -sf /configuration/nginx.conf /etc/nginx/nginx.conf && \
ln -sf /configuration/php-fpm.conf /etc/php/7.0/fpm/php-fpm.conf && \
ln -sf /configuration/php-fpm-pool.conf /etc/php/7.0/fpm/pool.d/www.conf && \
ln -sf /configuration/php.ini /etc/php/7.0/fpm/php.ini
EXPOSE 80
CMD /usr/bin/supervisord -n