Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
3f4213ac25 | |||
2c25c90bc6 | |||
2832f455a7 | |||
695137b441 | |||
21257d7047 | |||
a5115a7579 |
21
Dockerfile
21
Dockerfile
@ -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 \
|
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
|
RUN pip install supervisor-stdout
|
||||||
|
|
||||||
ENV MW_VERSION REL1_33
|
ENV MW_VERSION REL1_34
|
||||||
ENV MW_SOURCE https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.1.tar.gz
|
ENV MW_SOURCE https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.tar.gz
|
||||||
ENV SMF_VERSION 2.0.15
|
ENV SMF_VERSION 2.0.16
|
||||||
ENV SMF_SOURCE https://download.simplemachines.org/index.php/smf_2-0-15_install.tar.gz
|
ENV SMF_SOURCE https://download.simplemachines.org/index.php/smf_2-0-16_install.tar.gz
|
||||||
|
|
||||||
ENV SOURCE_ROOT /application
|
ENV SOURCE_ROOT /application
|
||||||
ENV WIKI_SOURCE $SOURCE_ROOT/w
|
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
|
RUN cd $WIKI_SOURCE && composer update --no-dev
|
||||||
|
|
||||||
ADD configuration configuration
|
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
|
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
|
RUN chmod +x /usr/bin/wait-for-it
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
CMD /usr/bin/supervisord -n
|
CMD /scripts/start
|
||||||
|
@ -77,7 +77,7 @@ class GCL3Template extends QuickTemplate {
|
|||||||
$action = $wgRequest->getText( 'action' );
|
$action = $wgRequest->getText( 'action' );
|
||||||
|
|
||||||
// Suppress warnings to prevent notices about missing indexes in $this->data
|
// Suppress warnings to prevent notices about missing indexes in $this->data
|
||||||
wfSuppressWarnings();
|
//wfSuppressWarnings();
|
||||||
|
|
||||||
//$this->html( 'headelement' );
|
//$this->html( 'headelement' );
|
||||||
$this->head();
|
$this->head();
|
||||||
@ -268,7 +268,7 @@ if($this->data['copyrightico']) { ?>
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</body></html>
|
</body></html>
|
||||||
<?php
|
<?php
|
||||||
wfRestoreWarnings();
|
//wfRestoreWarnings();
|
||||||
} // end of execute() method
|
} // end of execute() method
|
||||||
|
|
||||||
/*************************************************************************************************/
|
/*************************************************************************************************/
|
||||||
|
4
configuration/MWSettings.php
Executable file → Normal file
4
configuration/MWSettings.php
Executable file → Normal file
@ -147,7 +147,7 @@ $wgDiff3 = "/usr/bin/diff3";
|
|||||||
# sure that cached pages are cleared.
|
# sure that cached pages are cleared.
|
||||||
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
|
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
|
||||||
|
|
||||||
include_once('extensions/FlaggedRevs/FlaggedRevs.php');
|
wfLoadExtension("FlaggedRevs");
|
||||||
|
|
||||||
$wgGroupPermissions['*']['edit'] = false;
|
$wgGroupPermissions['*']['edit'] = false;
|
||||||
$wgGroupPermissions['QC'] = array_merge($wgGroupPermissions['editor'],$wgGroupPermissions['reviewer']);
|
$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
|
// disable creating account from the wiki
|
||||||
$wgGroupPermissions['*']['createaccount'] = false;
|
$wgGroupPermissions['*']['createaccount'] = false;
|
||||||
|
|
||||||
require_once('extensions/Interwiki/Interwiki.php');
|
wfLoadExtension("Interwiki");
|
||||||
$wgGroupPermissions['*']['interwiki'] = false;
|
$wgGroupPermissions['*']['interwiki'] = false;
|
||||||
$wgGroupPermissions['sysop']['interwiki'] = true;
|
$wgGroupPermissions['sysop']['interwiki'] = true;
|
||||||
|
|
||||||
|
@ -265,5 +265,4 @@ env[GCL_PARSOID_DOMAIN] = $GCL_PARSOID_DOMAIN
|
|||||||
; enough for MediaWiki.
|
; enough for MediaWiki.
|
||||||
; Also, SMF expects the session id to be at most 32 characters (smf_sessions table)
|
; 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.sid_length] = 32 ; for PHP 7.1.0
|
||||||
php_value[session.hash_function] = 1
|
php_value[session.sid_bits_per_character] = 5
|
||||||
php_value[session.hash_bits_per_character] = 5
|
|
||||||
|
@ -69,4 +69,4 @@ daemonize = no
|
|||||||
|
|
||||||
; To configure the pools it is recommended to have one .conf file per
|
; To configure the pools it is recommended to have one .conf file per
|
||||||
; pool in the following directory:
|
; pool in the following directory:
|
||||||
include=/etc/php/7.0/fpm/pool.d/*.conf
|
include=/etc/php/@PHP_VER@/fpm/pool.d/*.conf
|
||||||
|
@ -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
|
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
|
||||||
|
|
||||||
[program:php-fpm]
|
[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
|
stdout_events_enabled=true
|
||||||
stderr_events_enabled=true
|
stderr_events_enabled=true
|
||||||
|
|
||||||
|
0
scripts/refresh_styles.sh
Executable file → Normal file
0
scripts/refresh_styles.sh
Executable file → Normal file
18
scripts/start
Executable file
18
scripts/start
Executable 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
|
Reference in New Issue
Block a user