Docker: Difference between revisions
From SemanticOrganization
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=== Prerequisites === | === Prerequisites === | ||
Install [https://docs.docker.com/engine/install docker] and [https://docs.docker.com/compose/install/ docker | Install [https://docs.docker.com/engine/install docker] and [https://docs.docker.com/compose/install/ docker compose]. | ||
=== Installation === | === Installation === | ||
Line 67: | Line 67: | ||
* Semantic Organization | * Semantic Organization | ||
To install additional extensions ... | To install additional extensions enter the container with <code>docker compose exec semorg bash</code> and create the file <code>/var/www/html/config/EXTENSIONS</code>. Add a line for every extension you would like to include. If the extension is hosted by MediaWiki it's enough to write the name of the extension, if not add the repository URL after a pipe: | ||
SomeOfficialMediaWikiExtension | |||
SomeUnofficialExtension|https://foreign.repo | |||
=== Upgrading === | === Upgrading === | ||
Line 73: | Line 76: | ||
Update image: | Update image: | ||
sudo docker | sudo docker compose pull | ||
Update skin and extensions: | Update skin and extensions: | ||
Line 80: | Line 83: | ||
* other extensions (pull) | * other extensions (pull) | ||
sudo docker | sudo docker compose exec semorg /update.sh |
Latest revision as of 08:31, 5 June 2024
Prerequisites
Install docker and docker compose.
Installation
Create a compose.yml
file, use this template, change the variables according to your needs:
volumes: db: images: config: # custom: services: semorg: image: kollaborat/semorg:1.35 restart: unless-stopped environment: - MYSQL_HOST=db - MYSQL_DATABASE=semorg - MYSQL_USER=semorg - MYSQL_PASSWORD=<YOURDBPASSWORD> - MEDIAWIKI_LANG=en - MEDIAWIKI_ADMIN_USERNAME=admin - MEDIAWIKI_ADMIN_PASSWORD=<YOURADMINPASSWORD> - MEDIAWIKI_NAME=<YOURWIKINAME> - MEDIAWIKI_SERVER=<YOURSERVER> # - MEDIAWIKI_DEBUG=true # - MEDIAWIKI_CUSTOM=true ports: - "8081:80" volumes: - images:/var/www/html/images - config:/var/www/html/config # - custom:/var/www/html/extensions/SemanticOrganization/resources/custom depends_on: - db logging: options: max-size: 50m db: image: mariadb restart: unless-stopped volumes: - db:/var/lib/mysql environment: - MARIADB_RANDOM_ROOT_PASSWORD=yes - MARIADB_DATABASE=semorg - MARIADB_USER=semorg - MARIADB_PASSWORD=<YOURDBPASSWORD> logging: options: max-size: 50m
Additional Extensions
The Tweeki skin and the following extensions are included by default:
- Semantic MediaWiki (via composer)
- Semantic Result Formats (via composer)
- Maps (via composer)
- Page Forms
- Semantic Organization
To install additional extensions enter the container with docker compose exec semorg bash
and create the file /var/www/html/config/EXTENSIONS
. Add a line for every extension you would like to include. If the extension is hosted by MediaWiki it's enough to write the name of the extension, if not add the repository URL after a pipe:
SomeOfficialMediaWikiExtension SomeUnofficialExtension|https://foreign.repo
Upgrading
Update image:
sudo docker compose pull
Update skin and extensions:
- Tweeki (pull)
- SemanticOrganization (pull and page import)
- other extensions (pull)
sudo docker compose exec semorg /update.sh