@@ -10,8 +10,7 @@ ENV MW_VERSION=REL1_39 \
1010 MW_ORIGIN_FILES=/mw_origin_files \
1111 MW_VOLUME=/mediawiki \
1212 WWW_USER=www-data \
13- WWW_GROUP=www-data \
14- APACHE_LOG_DIR=/var/log/apache2
13+ WWW_GROUP=www-data
1514
1615# System setup
1716RUN set x; \
@@ -21,7 +20,6 @@ RUN set x; \
2120 && aptitude -y upgrade \
2221 && aptitude install -y \
2322 git \
24- apache2 \
2523 software-properties-common \
2624 gpg \
2725 apt-transport-https \
@@ -58,20 +56,15 @@ RUN set x; \
5856 php7.4-apcu \
5957 php7.4-redis \
6058 php7.4-curl \
61- php7.4-zip \
59+ php7.4-zip \
60+ php7.4-fpm \
6261 && aptitude clean \
6362 && rm -rf /var/lib/apt/lists/*
6463
6564# Post install configuration
6665RUN set -x; \
67- # Remove default config
68- rm /etc/apache2/sites-enabled/000-default.conf \
69- && rm /etc/apache2/sites-available/000-default.conf \
70- && rm -rf /var/www/html \
71- # Enable rewrite module
72- && a2enmod rewrite \
7366 # Create directories
74- && mkdir -p $MW_HOME \
67+ mkdir -p $MW_HOME \
7568 && mkdir -p $MW_ORIGIN_FILES \
7669 && mkdir -p $MW_VOLUME
7770
@@ -631,34 +624,25 @@ ENV MW_ENABLE_JOB_RUNNER=true \
631624 LOG_FILES_REMOVE_OLDER_THAN_DAYS=10
632625
633626COPY _sources/configs/msmtprc /etc/
634- COPY _sources/configs/mediawiki.conf /etc/apache2/sites-enabled/
635- COPY _sources/configs/status.conf /etc/apache2/mods-available/
636627COPY _sources/configs/php_error_reporting.ini _sources/configs/php_upload_max_filesize.ini /etc/php/7.4/cli/conf.d/
637- COPY _sources/configs/php_error_reporting.ini _sources/configs/php_upload_max_filesize.ini /etc/php/7.4/apache2/conf.d/
638- COPY _sources/configs/php_max_input_vars.ini _sources/configs/php_max_input_vars.ini /etc/php/7.4/apache2/conf.d/
639- COPY _sources/configs/php_timeouts.ini /etc/php/7.4/apache2/conf.d/
628+ COPY _sources/configs/php_error_reporting.ini _sources/configs/php_upload_max_filesize.ini /etc/php/7.4/fpm/conf.d/
640629COPY _sources/scripts/*.sh /
641630COPY _sources/scripts/*.php $MW_HOME/maintenance/
642631COPY _sources/configs/robots.txt $WWW_ROOT/
643632COPY _sources/configs/.htaccess $WWW_ROOT/
644633COPY _sources/images/favicon.ico $WWW_ROOT/
645634COPY _sources/canasta/LocalSettings.php _sources/canasta/CanastaUtils.php _sources/canasta/CanastaDefaultSettings.php $MW_HOME/
646635COPY _sources/canasta/getMediawikiSettings.php /
647- COPY _sources/configs/mpm_prefork.conf /etc/apache2/mods-available/mpm_prefork.conf
648636
649637RUN set -x; \
650638 chmod -v +x /*.sh \
651639 # Sitemap directory
652640 && ln -s $MW_VOLUME/sitemap $MW_HOME/sitemap \
653- # Comment out ErrorLog and CustomLog parameters, we use rotatelogs in mediawiki.conf for the log files
654- && sed -i 's/^\(\s *ErrorLog .*\) /# \1 /g' /etc/apache2/apache2.conf \
655- && sed -i 's/^\(\s *CustomLog .*\) /# \1 /g' /etc/apache2/apache2.conf \
656641 # Make web installer work with Canasta
657642 && cp "$MW_HOME/includes/NoLocalSettings.php" "$MW_HOME/includes/CanastaNoLocalSettings.php" \
658643 && sed -i 's/MW_CONFIG_FILE/CANASTA_CONFIG_FILE/g' "$MW_HOME/includes/CanastaNoLocalSettings.php" \
659- # Modify config
660- && sed -i '/<Directory \/ var\/ www\/ >/,/<\/ Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf \
661- && a2enmod expires
644+ # Enable environment variables for FPM workers
645+ && sed -i '/clear_env/s/^;//' /etc/php/7.4/fpm/pool.d/www.conf
662646
663647COPY _sources/images/Powered-by-Canasta.png /var/www/mediawiki/w/resources/assets/
664648
0 commit comments