Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ tasks:
- task: init-elastic
- task: init-sitemap
mw-maintenance: docker compose exec -it -w /var/www/html/w/ mediawiki php maintenance/run.php -- {{.CLI_ARGS}}
download-map: curl -o map.osm.pbf https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ services:
condition: service_started
volumes:
- ${EUCR_MW_UPLOADS}:/var/www/html/w/images
- ${EUCR_MW_BORDERS}:/var/www/html/w/borders
healthcheck:
test: curl --fail http://mediawiki/wiki/Special:BlankPage || exit 1
interval: 10s
Expand Down Expand Up @@ -135,6 +136,12 @@ services:
environment:
RENDERER_ACCESS_KEY: secret

# Reenable if a dedicated tile server will be needed and/or possible
# tileserver:
# image: overv/openstreetmap-tile-server
# volumes: ${EUCR_TILESERVER_DATA}:/data/database
# command: "run"

volumes:
esdata:
driver: local
6 changes: 6 additions & 0 deletions mediawiki/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
wfLoadExtension('Scribunto');
wfLoadExtension('ShortDescription');
wfLoadExtension('Shubara');
wfLoadExtension('Shubara/AreWeLegalYet');
wfLoadExtension('SpamBlacklist');
wfLoadExtension('StopForumSpam');
wfLoadExtension('SyntaxHighlight_GeSHi');
Expand Down Expand Up @@ -469,4 +470,9 @@
if (str_contains($wgServer, 'localhost')) { // if running locally
$wgShowDebug = true;
$wgShowExceptionDetails = true;
$wgCacheDirectory = "/tmp";
$wgMainCacheType = CACHE_NONE;
$wgParserCacheType = CACHE_NONE; # optional
$wgMessageCacheType = CACHE_NONE; # optional
$wgSessionCacheType = CACHE_NONE; # optional
}
3 changes: 3 additions & 0 deletions mediawiki/mediawiki.conf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
<Directory /var/www/html/w/vendor/>
Deny from all
</Directory>
<Directory /var/www/html/w/borders/>
Deny from all
</Directory>
<Directory /var/www/html/w/extensions/Echo/modules/>
Allow from all
</Directory>
Expand Down
56 changes: 56 additions & 0 deletions shubara/AreWeLegalYet/extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "Shubara/AreWeLegalYet",
"author": "Voltangle",
"url": "https://github.com/voltangle/theeucwiki/tree/master/shubara/AreWeLegalYet",
"description": "Implements the Special:AreWeLegalYet page.",
"version": "0.1.0",
"license-name": "MIT",
"type": "specialpage",
"requires": {
"MediaWiki": ">= 1.43"
},
"AutoloadNamespaces": {
"MediaWiki\\Extension\\Shubara\\AreWeLegalYet\\": "src/"
},
"SpecialPages": {
"AreWeLegalYet": "MediaWiki\\Extension\\Shubara\\AreWeLegalYet\\Page"
},
"MessageDirs": {
"Shubara/AreWeLegalYet": [
"i18n"
]
},
"ResourceModules": {
"ext.shubara.arewelegalyet": {
"localBasePath": "resources/ext.shubara.arewelegalyet",
"remoteExtPath": "Shubara/AreWeLegalYet/resources/ext.shubara.arewelegalyet",
"packageFiles": [
"map.js"
],
"styles": [
"styles.css"
],
"dependencies": [
"oojs",
"mediawiki.util",
"ext.shubara.leaflet"
]
},
"ext.shubara.leaflet": {
"localBasePath": "resources/ext.shubara.leaflet",
"remoteExtPath": "Shubara/AreWeLegalYet/resources/ext.shubara.leaflet",
"packageFiles": ["leaflet.js"],
"styles": ["leaflet.css"]
}
},
"APIModules": {
"getgeoborders": "MediaWiki\\Extension\\Shubara\\AreWeLegalYet\\BorderApi"
},
"config": {
"TileServerURL": {
"value": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"description": "What tile server to use. By default OpenStreetMap.org."
}
},
"manifest_version": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var map = L.map('map').setView([30.0, -20.0], 3);

L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> and all contributors of The EUC Wiki'
}).addTo(map);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#map { height: calc(100vh - 260px); }

h1 {
margin-top: 0px;
}
Loading