Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
jb-vpn.uk Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Documentation:Wiki Deployment
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Production wikis run on this VPS under <code>/var/www/wiki.jb/</code>. == Stack == {| class="wikitable" |- | Service || Container || Public URL || Upstream |- | Main wiki || <code>wiki-mediawiki</code> || https://wiki.jb-vpn.uk || <code>127.0.0.1:8010</code> |- | Werbs wiki || <code>wiki-werbs-mediawiki</code> || https://werbs-wiki.jb-vpn.uk || <code>127.0.0.1:8011</code> |- | Database || <code>wiki-mariadb</code> || (internal) || <code>127.0.0.1:3307</code> |} * '''MediaWiki version''': 1.44 (Docker image <code>mediawiki:1.44</code>) * '''Edge proxy''': Caddy (<code>/etc/caddy/Caddyfile</code>) terminates HTTPS and proxies to the containers * '''Config on host''': <code>wiki/LocalSettings.php</code>, <code>werbs-wiki/LocalSettings.php</code> (mounted read-only; group <code>www-data</code> must be able to read) * '''Uploads''': <code>wiki/images/</code>, <code>werbs-wiki/images/</code> == Daily operations == <pre class="lang-bash"> cd /var/www/wiki.jb docker compose ps docker compose logs -f wiki docker compose restart wiki werbs-wiki </pre> Upload documentation from the VPS: <pre class="lang-bash"> python3 /root/wiki_manager.py --upload -y python3 /root/wiki_manager.py --update-main-page -y </pre> Optional uploads without public HTTPS round-trip: <pre class="lang-bash"> python3 /root/wiki_manager.py --upload -y --wiki-url http://127.0.0.1:8010 </pre> == Email == Outbound mail uses Fastmail SMTP (configured in each <code>LocalSettings.php</code>: <code>$wgSMTP</code>, <code>$wgPasswordSender</code>, <code>$wgEmergencyContact</code>). After editing settings on the host, ensure permissions remain <code>640</code> and group <code>www-data</code>. == Backups == <pre class="lang-bash"> cd /var/www/wiki.jb bash scripts/backup-wikis.sh </pre> Creates <code>backups/YYYY-MM-DD/</code> with <code>mediawiki.sql</code>, <code>mediawiki_werbs.sql</code>, and <code>wiki-images.tar.gz</code>. Deletes backup folders older than 30 days (<code>RETENTION_DAYS=0</code> to disable pruning). Weekly cron (root): <pre class="lang-cron"> 0 3 '' '' 0 /var/www/wiki.jb/scripts/backup-wikis.sh >> /var/log/wiki-backup.log 2>&1 </pre> == Maintenance == <pre class="lang-bash"> cd /var/www/wiki.jb source .env docker compose exec -T wiki php maintenance/run.php update --quick --conf /var/www/html/LocalSettings.php docker compose exec -T werbs-wiki php maintenance/run.php update --quick --conf /var/www/html/LocalSettings.php </pre> Logos after image restores: <code>bash scripts/fix-logos.sh</code> == Extensions == The VPS <code>LocalSettings.php</code> files use the '''default MediaWiki 1.44 extension set''' from the installer (skins only unless you add more). Content was imported from the NAS farm; per-wiki farm files (<code>LocalSettings_wiki.php</code>, <code>LocalSettings_werbs-wiki.php</code>) are not on this server. To restore NAS-only extensions: # Copy farm configs from the NAS backup (e.g. <code>/volume2/Backups/wiki-migration-*</code> or <code>/volume2/web_packages/mediawiki/</code>). # Merge any <code>wfLoadExtension(...)</code> lines into the matching VPS <code>LocalSettings.php</code>. # Run <code>maintenance/run.php update --quick</code> in the affected container. <code>$wgEnableUploads</code> is enabled so existing files under <code>wiki/images/</code> and <code>werbs-wiki/images/</code> remain usable. == Scripts (<code>/var/www/wiki.jb/scripts/</code>) == {| class="wikitable" |- | Script || Purpose |- | <code>backup-wikis.sh</code> || Dump both DBs and image trees to <code>backups/YYYY-MM-DD/</code> |- | <code>fix-logos.sh</code> || Set <code>$wgLogos</code> paths after image changes |- | <code>init-db-users.sh</code> || Create/grant <code>wikiuser</code> in MariaDB |- | <code>install-wikis.sh</code> || Fresh MediaWiki install (empty DB only) |} == First-time install (empty databases) == Only needed on a fresh stack without imported content: <pre class="lang-bash"> cd /var/www/wiki.jb cp .env.example .env # set passwords docker compose up -d bash scripts/init-db-users.sh bash scripts/install-wikis.sh </pre> Admin credentials from <code>.env</code>: <code>WIKI_ADMIN_USER</code> / <code>WIKI_ADMIN_PASSWORD</code> (installer account; production wiki admin is the imported '''Josh''' sysop account). [[Category:Documentation]] [[Category:Documentation/Wiki]]
Summary:
Please note that all contributions to jb-vpn.uk Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Jb-vpn.uk Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Documentation:Wiki Deployment
Add topic