Files
glitch-city-laboratories/Dockerfile

60 lines
2.5 KiB
Docker
Raw Normal View History

2014-09-17 22:20:31 -05:00
FROM debian:stable
2018-02-01 09:11:35 -06:00
RUN apt-get -y update && apt-get -y install nginx php-fpm php-mysql php-apcu php-mbstring php-xml supervisor python-pip \
2018-08-12 06:30:19 -05:00
mysql-client imagemagick curl wget zip unzip php-pclzip git msmtp msmtp-mta
2014-09-17 22:20:31 -05:00
RUN pip install supervisor-stdout
2018-08-08 20:54:57 -05:00
ENV MW_VERSION REL1_31
2018-08-11 13:10:42 -05:00
ENV MW_SOURCE https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.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
2017-01-01 06:12:42 -06:00
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
2014-09-17 22:20:31 -05:00
2017-01-01 06:12:42 -06:00
# Install composer
RUN cd /usr/src && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
2017-10-21 20:47:52 -05:00
# Clone mediawiki and SMF source into temp directory, install and then copy over to application dir
2017-01-01 06:12:42 -06:00
RUN cd /tmp && wget $MW_SOURCE && tar -xvf mediawiki-*.tar.gz && \
2017-10-21 20:47:52 -05:00
cp -Rv mediawiki-*/* $WIKI_SOURCE && rm -rf mediawiki-* && \
2017-10-21 23:35:43 -05:00
mkdir smf && cd smf && wget $SMF_SOURCE && tar -xvf smf_*.tar.gz && \
rm -rf Settings.php attachments smf_*.tar.gz && cp -Rv * $FORUMS_SOURCE
2017-01-01 06:12:42 -06:00
2018-02-03 22:11:39 -06:00
RUN chown -R www-data:www-data $SOURCE_ROOT
RUN cd "$WIKI_SOURCE/maintenance" && \
sh -c 'for TOOL in *.php; do LINK="/usr/bin/$(basename $TOOL .php)"; echo "#!/bin/sh\nphp $WIKI_SOURCE/maintenance/$TOOL \$@" > $LINK; chmod +x $LINK; done'
# Add our scripts
ADD scripts scripts
# Install additional extensions
# 12 August 2018: Nuke extension is not bundled with MediaWiki 1.31 by mistake.
# It will be added back in the next release.
2018-02-01 21:41:23 -06:00
RUN /scripts/add_extension.sh FlaggedRevs $MW_VERSION && \
/scripts/add_extension.sh CheckUser $MW_VERSION && \
/scripts/add_extension.sh Contributors $MW_VERSION && \
/scripts/add_extension.sh Nuke $MW_VERSION && \
/scripts/add_extension.sh Auth_remoteuser $MW_VERSION
# Add our stuff
ADD --chown=www-data:www-data application application
2018-02-01 09:11:35 -06:00
RUN cd $WIKI_SOURCE && composer update --no-dev
ADD configuration configuration
RUN ln -sf /configuration/supervisord.conf /etc/supervisor/supervisord.conf && \
2014-09-17 22:20:31 -05:00
ln -sf /configuration/nginx.conf /etc/nginx/nginx.conf && \
2017-10-21 23:35:43 -05:00
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
2016-08-01 01:24:18 -05:00
2014-09-17 22:20:31 -05:00
EXPOSE 80
CMD /usr/bin/supervisord -n