Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

64 lignes
2.7KB

  1. FROM debian:stable
  2. RUN apt-get -y update && apt-get -y install nginx php-fpm php-mysql php-apcu php-mbstring php-xml supervisor python-pip \
  3. mysql-client imagemagick curl wget zip unzip php-pclzip git msmtp msmtp-mta
  4. RUN pip install supervisor-stdout
  5. ENV MW_VERSION REL1_31
  6. ENV MW_SOURCE https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz
  7. ENV SMF_VERSION 2.0.15
  8. ENV SMF_SOURCE https://download.simplemachines.org/index.php/smf_2-0-15_install.tar.gz
  9. ENV SOURCE_ROOT /application
  10. ENV WIKI_SOURCE $SOURCE_ROOT/w
  11. ENV FORUMS_SOURCE $SOURCE_ROOT/forums
  12. RUN mkdir userdata && mkdir $SOURCE_ROOT && \
  13. mkdir $WIKI_SOURCE && mkdir $FORUMS_SOURCE
  14. # Install composer
  15. RUN cd /usr/src && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  16. # Clone mediawiki and SMF source into temp directory, install and then copy over to application dir
  17. RUN cd /tmp && wget $MW_SOURCE && tar -xvf mediawiki-*.tar.gz && \
  18. cp -Rv mediawiki-*/* $WIKI_SOURCE && rm -rf mediawiki-* && \
  19. mkdir smf && cd smf && wget $SMF_SOURCE && tar -xvf smf_*.tar.gz && \
  20. rm -rf Settings.php attachments smf_*.tar.gz && cp -Rv * $FORUMS_SOURCE
  21. RUN chown -R www-data:www-data $SOURCE_ROOT
  22. RUN cd "$WIKI_SOURCE/maintenance" && \
  23. 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'
  24. # Add our scripts
  25. ADD scripts scripts
  26. # Install additional extensions
  27. # 12 August 2018: Nuke extension is not bundled with MediaWiki 1.31 by mistake.
  28. # It will be added back in the next release.
  29. RUN /scripts/add_extension.sh FlaggedRevs $MW_VERSION && \
  30. /scripts/add_extension.sh CheckUser $MW_VERSION && \
  31. /scripts/add_extension.sh Contributors $MW_VERSION && \
  32. /scripts/add_extension.sh Nuke $MW_VERSION && \
  33. /scripts/add_extension.sh Auth_remoteuser $MW_VERSION
  34. # Install SMF mods
  35. # 3 September 2018: These would also need to be installed in the database.
  36. RUN /scripts/add_mod.php "http://custom.simplemachines.org/mods/index.php?action=download;mod=3067;id=179832"
  37. # Add our stuff
  38. ADD --chown=www-data:www-data application application
  39. RUN cd $WIKI_SOURCE && composer update --no-dev
  40. ADD configuration configuration
  41. RUN ln -sf /configuration/supervisord.conf /etc/supervisor/supervisord.conf && \
  42. ln -sf /configuration/nginx.conf /etc/nginx/nginx.conf && \
  43. ln -sf /configuration/php-fpm.conf /etc/php/7.0/fpm/php-fpm.conf && \
  44. ln -sf /configuration/php-fpm-pool.conf /etc/php/7.0/fpm/pool.d/www.conf && \
  45. ln -sf /configuration/php.ini /etc/php/7.0/fpm/php.ini
  46. EXPOSE 80
  47. CMD /usr/bin/supervisord -n