6 Commits

Author SHA1 Message Date
3f4213ac25 session.hash_function/hash_bits_per_character was removed in php 7.1 2019-12-30 01:34:00 -06:00
2c25c90bc6 never mind 2019-12-30 01:14:47 -06:00
2832f455a7 php-fpm seems to be outputting log messages anyway so don't need to tail the log 2019-12-30 01:11:34 -06:00
695137b441 various updates to make it run on debian 10
still doesn't quite work properly, Special:RecentChanges is broken and so is logging in
2019-12-30 01:10:22 -06:00
21257d7047 fix includes of some extensions 2019-12-29 20:46:35 -06:00
a5115a7579 update mediawiki to 1.34 and smf to 2.0.16 2019-12-29 03:55:14 -06:00
8 changed files with 32 additions and 22 deletions

View File

@ -1,13 +1,13 @@
FROM debian:stable
FROM debian:buster
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 git msmtp msmtp-mta
default-mysql-client imagemagick curl wget zip unzip php-pclzip git msmtp msmtp-mta
RUN pip install supervisor-stdout
ENV MW_VERSION REL1_33
ENV MW_SOURCE https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.1.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 MW_VERSION REL1_34
ENV MW_SOURCE https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.tar.gz
ENV SMF_VERSION 2.0.16
ENV SMF_SOURCE https://download.simplemachines.org/index.php/smf_2-0-16_install.tar.gz
ENV SOURCE_ROOT /application
ENV WIKI_SOURCE $SOURCE_ROOT/w
@ -53,16 +53,9 @@ ADD --chown=www-data:www-data application application
RUN cd $WIKI_SOURCE && composer update --no-dev
ADD configuration configuration
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
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /usr/bin/wait-for-it
RUN chmod +x /usr/bin/wait-for-it
EXPOSE 80
CMD /usr/bin/supervisord -n
CMD /scripts/start

View File

@ -77,7 +77,7 @@ class GCL3Template extends QuickTemplate {
$action = $wgRequest->getText( 'action' );
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
//wfSuppressWarnings();
//$this->html( 'headelement' );
$this->head();
@ -268,7 +268,7 @@ if($this->data['copyrightico']) { ?>
<?php endif; ?>
</body></html>
<?php
wfRestoreWarnings();
//wfRestoreWarnings();
} // end of execute() method
/*************************************************************************************************/

4
configuration/MWSettings.php Executable file → Normal file
View File

@ -147,7 +147,7 @@ $wgDiff3 = "/usr/bin/diff3";
# sure that cached pages are cleared.
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
include_once('extensions/FlaggedRevs/FlaggedRevs.php');
wfLoadExtension("FlaggedRevs");
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['QC'] = array_merge($wgGroupPermissions['editor'],$wgGroupPermissions['reviewer']);
@ -177,7 +177,7 @@ require_once("$IP/extensions/BBCodeSyntax/BBCodeSyntax.php");
// disable creating account from the wiki
$wgGroupPermissions['*']['createaccount'] = false;
require_once('extensions/Interwiki/Interwiki.php');
wfLoadExtension("Interwiki");
$wgGroupPermissions['*']['interwiki'] = false;
$wgGroupPermissions['sysop']['interwiki'] = true;

View File

@ -265,5 +265,4 @@ env[GCL_PARSOID_DOMAIN] = $GCL_PARSOID_DOMAIN
; enough for MediaWiki.
; Also, SMF expects the session id to be at most 32 characters (smf_sessions table)
php_value[session.sid_length] = 32 ; for PHP 7.1.0
php_value[session.hash_function] = 1
php_value[session.hash_bits_per_character] = 5
php_value[session.sid_bits_per_character] = 5

View File

@ -69,4 +69,4 @@ daemonize = no
; To configure the pools it is recommended to have one .conf file per
; pool in the following directory:
include=/etc/php/7.0/fpm/pool.d/*.conf
include=/etc/php/@PHP_VER@/fpm/pool.d/*.conf

View File

@ -16,7 +16,7 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[program:php-fpm]
command=/usr/sbin/php-fpm7.0 -c /etc/php/7.0/fpm
command=/usr/sbin/php-fpm@PHP_VER@ -c /etc/php/@PHP_VER@/fpm
stdout_events_enabled=true
stderr_events_enabled=true

0
scripts/refresh_styles.sh Executable file → Normal file
View File

18
scripts/start Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
PHP_VER=$(php --version | head -n 1 | cut -d" " -f2 | cut -c 1-3)
cp /configuration/nginx.conf /etc/nginx/nginx.conf
cp /configuration/supervisord.conf "/etc/supervisor/supervisord.conf"
sed -i "s/@PHP_VER@/$PHP_VER/g" /etc/supervisor/supervisord.conf
cp /configuration/php-fpm.conf "/etc/php/$PHP_VER/fpm/php-fpm.conf"
sed -i "s/@PHP_VER@/$PHP_VER/g" "/etc/php/$PHP_VER/fpm/php-fpm.conf"
cp /configuration/php-fpm-pool.conf "/etc/php/$PHP_VER/fpm/pool.d/www.conf"
sed -i "s/@PHP_VER@/$PHP_VER/g" "/etc/php/$PHP_VER/fpm/pool.d/www.conf"
cp /configuration/php.ini "/etc/php/$PHP_VER/fpm/php.ini"
sed -i "s/@PHP_VER@/$PHP_VER/g" "/etc/php/$PHP_VER/fpm/php.ini"
/usr/bin/supervisord -n