Initial Commit

This commit is contained in:
Ales (Shagi) Zabala Alava 2021-09-08 21:28:42 +02:00
commit d2a217a444
7 changed files with 251 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/data
/html-es.hackmeeting.org
/docker-compose.override.yml
/environment_mariadb_local
/backups/*sql

0
backups/.gitkeep Normal file
View File

18
docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
version: "3"
services:
hm:
restart: always
build: ./images/hm
ports:
- "8080:80"
volumes:
- ./html-es.hackmeeting.org:/var/www/html
- ./etc/hm/LocalSettings.php:/var/www/html/LocalSettings.php
mariadb:
restart: always
image: mariadb
env_file: environment_mariadb
volumes:
- ./data/mariadb:/var/lib/mysql
- ./backups:/backups

4
environment_mariadb Normal file
View File

@ -0,0 +1,4 @@
MARIADB_ROOT_PASSWORD=root
MARIADB_DATABASE=hackmeeting
MARIADB_USER=hackmeeting
MARIADB_PASSWORD=hackmeeting

182
etc/hm/LocalSettings.php Normal file
View File

@ -0,0 +1,182 @@
<?php
# This file was automatically generated by the MediaWiki 1.28.2
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "wiki es.hackmeeting.org";
$wgMetaNamespace = "Wiki_es.hackmeeting.org";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/hm";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://localhost:8080";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL path to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "info@es.hackmeeting.org";
$wgPasswordSender = "info@es.hackmeeting.org";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "mariadb";
$wgDBname = "hackmeeting";
$wgDBuser = "hackmeeting";
$wgDBpassword = "hackmeeting";
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;
## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
#$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'webp' );
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'webp', 'pdf', 'ogg', 'odp' );
#$wgMaxUploadSize = 1024*1024*100 ;
$wgMaxUploadSize = 1024*1024*100 ;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = true;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = true;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "en_US.utf8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "es";
$wgSecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "XXXXXXXXXXXXXXXX";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "https://www.gnu.org/copyleft/fdl.html";
$wgRightsText = "GNU Free Documentation License 1.3 or later";
$wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/gnu-fdl.png";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "";
# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
#wfLoadSkin( 'CologneBlue' );
#wfLoadSkin( 'Modern' );
#wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Vector' );
# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtensions('ExtensionName');
# to LocalSettings.php. Check specific extension documentation for more details.
# The following extensions were automatically enabled:
wfLoadExtension( 'Cite' );
wfLoadExtension( 'ConfirmEdit' );
wfLoadExtension( 'InputBox' );
wfLoadExtension( 'Interwiki' );
wfLoadExtension( 'LocalisationUpdate' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'Renameuser' );
wfLoadExtension( 'TitleBlacklist' );
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'EmbedVideo' );
# End of automatically generated settings.
# Add more configuration options below.
// TODO: fix email issue
// $wgTmpDirectory="/home/users/investici.org/es_hackmeeting/tmp" ;
wfLoadExtension( 'WikiEditor' );
# Enables use of WikiEditor by default but still allows users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
# Enables link and table wizards by default but still allows users to disable them in preferences
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 1;
# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 1;
$wgGroupPermissions['user']['import'] = true;
$wgGroupPermissions['user']['importupload'] = true;
$wgShowExceptionDetails = true;
$wgUrlProtocols[]="retroshare://";

16
images/hm/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM php:7.0-apache
RUN apt-get update
RUN apt-get install -y unzip libicu-dev
# RUN apt-get install -y libzip4 libzip-dev
# RUN docker-php-ext-install zip
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install gettext
RUN docker-php-ext-install intl
# RUN docker-php-ext-install mbstring
RUN a2enmod headers
RUN a2enmod rewrite
WORKDIR /var/www/html

26
readme.md Normal file
View File

@ -0,0 +1,26 @@
# Entorno de pruebas del mediawiki del hackmeeting
## Puesta en marcha
1. Obtener una copia de la web del hackmeeting y copiarla o enlazarla en
esta carpeta con el nombre `html-es.hackmeeting.org`
2. Obtener un backup de la base de datos y dejar el fichero `.sql`
descomprimido en la carpeta `backups`
3. Generar y arrancar los contenedores de docker:
docker-compose pull
docker-compose build
docker-compose up
4. En otra terminal, entrar en el contenedor de mariadb:
docker-compose exec mariadb bash
5. Importar backup de la base de datos dentro de mariadb. El fichero sql
que hemos copiado antes en la carpeta `backups` estará accesible
dentro del contenedor como `/backups/fichero.sql`
mysql -u root -p hackmeeting < /backups/fichero.sql
6. Acceder a la url http://localhost:8080 en el navegador
7. Para acceder a la wiki hay que poner a mano la dirección http://localhost:8080/hm/