Difference between revisions of "Docker"
From SemanticOrganization
(Created page with "Create a <code>docker-compose.yml</code> file") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Create a <code>docker-compose.yml</code> file | + | === Prerequisites === |
+ | |||
+ | Install [https://docs.docker.com/engine/install docker] and [https://docs.docker.com/compose/install/ docker-compose]. | ||
+ | |||
+ | === Installation === | ||
+ | |||
+ | Create a <code>docker-compose.yml</code> file, use this template, change the variables according to your needs: | ||
+ | |||
+ | <pre> | ||
+ | version: '3.5' | ||
+ | |||
+ | volumes: | ||
+ | db: | ||
+ | images: | ||
+ | config: | ||
+ | |||
+ | services: | ||
+ | semorg: | ||
+ | image: kollaborat/semorg:1.35 | ||
+ | restart: unless-stopped | ||
+ | environment: | ||
+ | - MYSQL_HOST=db | ||
+ | - MYSQL_DATABASE=mediawiki | ||
+ | - MYSQL_USER=mediawiki | ||
+ | - MYSQL_PASSWORD=secret | ||
+ | - MEDIAWIKI_LANG=en | ||
+ | - MEDIAWIKI_ADMIN_USERNAME=admin | ||
+ | - MEDIAWIKI_ADMIN_PASSWORD=secretpassword | ||
+ | - MEDIAWIKI_NAME=name | ||
+ | - MEDIAWIKI_SERVER=https://your.server | ||
+ | ports: | ||
+ | - "8081:80" | ||
+ | volumes: | ||
+ | - images:/var/www/html/images | ||
+ | - config:/var/www/html/config | ||
+ | depends_on: | ||
+ | - db | ||
+ | logging: | ||
+ | options: | ||
+ | max-size: 50m | ||
+ | |||
+ | db: | ||
+ | image: mariadb | ||
+ | restart: unless-stopped | ||
+ | volumes: | ||
+ | - db:/var/lib/mysql | ||
+ | environment: | ||
+ | - MYSQL_ROOT_PASSWORD=secret | ||
+ | - MYSQL_DATABASE=mediawiki | ||
+ | - MYSQL_USER=mediawiki | ||
+ | - MYSQL_PASSWORD=secret | ||
+ | logging: | ||
+ | options: | ||
+ | max-size: 50m | ||
+ | </pre> | ||
+ | |||
+ | build and start container: | ||
+ | |||
+ | sudo docker-compose up -d | ||
+ | |||
+ | === 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 ... | ||
+ | |||
+ | === 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 |
Latest revision as of 16:11, 2 November 2021
Prerequisites
Install docker and docker-compose.
Installation
Create a docker-compose.yml
file, use this template, change the variables according to your needs:
version: '3.5' volumes: db: images: config: services: semorg: image: kollaborat/semorg:1.35 restart: unless-stopped environment: - MYSQL_HOST=db - MYSQL_DATABASE=mediawiki - MYSQL_USER=mediawiki - MYSQL_PASSWORD=secret - MEDIAWIKI_LANG=en - MEDIAWIKI_ADMIN_USERNAME=admin - MEDIAWIKI_ADMIN_PASSWORD=secretpassword - MEDIAWIKI_NAME=name - MEDIAWIKI_SERVER=https://your.server ports: - "8081:80" volumes: - images:/var/www/html/images - config:/var/www/html/config depends_on: - db logging: options: max-size: 50m db: image: mariadb restart: unless-stopped volumes: - db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=secret - MYSQL_DATABASE=mediawiki - MYSQL_USER=mediawiki - MYSQL_PASSWORD=secret logging: options: max-size: 50m
build and start container:
sudo docker-compose up -d
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 ...
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