Docker: Difference between revisions

From SemanticOrganization
Jump to: navigation, search
Line 5: Line 5:
=== Installation ===
=== Installation ===


Create a <code>docker-compose.yml</code> file, use this template, change the variables according to your needs:
Create a <code>compose.yml</code> file, use this template, change the variables according to your needs:


<pre>
<pre>
version: '3.5'
volumes:  
volumes:  
   db:
   db:
   images:
   images:
   config:
   config:
#  custom:


services:
services:
Line 21: Line 20:
     environment:  
     environment:  
       - MYSQL_HOST=db
       - MYSQL_HOST=db
       - MYSQL_DATABASE=mediawiki
       - MYSQL_DATABASE=semorg
       - MYSQL_USER=mediawiki
       - MYSQL_USER=semorg
       - MYSQL_PASSWORD=secret
       - MYSQL_PASSWORD=<YOURDBPASSWORD>
       - MEDIAWIKI_LANG=en
       - MEDIAWIKI_LANG=en
       - MEDIAWIKI_ADMIN_USERNAME=admin
       - MEDIAWIKI_ADMIN_USERNAME=admin
       - MEDIAWIKI_ADMIN_PASSWORD=secretpassword
       - MEDIAWIKI_ADMIN_PASSWORD=<YOURADMINPASSWORD>
       - MEDIAWIKI_NAME=name
       - MEDIAWIKI_NAME=<YOURWIKINAME>
       - MEDIAWIKI_SERVER=https://your.server
       - MEDIAWIKI_SERVER=<YOURSERVER>
#      - MEDIAWIKI_DEBUG=true
#      - MEDIAWIKI_CUSTOM=true
     ports:
     ports:
       - "8081:80"
       - "8081:80"
Line 34: Line 35:
       - images:/var/www/html/images
       - images:/var/www/html/images
       - config:/var/www/html/config
       - config:/var/www/html/config
#      - custom:/var/www/html/extensions/SemanticOrganization/resources/custom
     depends_on:
     depends_on:
       - db
       - db
Line 46: Line 48:
       - db:/var/lib/mysql
       - db:/var/lib/mysql
     environment:
     environment:
       - MYSQL_ROOT_PASSWORD=secret
       - MARIADB_RANDOM_ROOT_PASSWORD=yes
       - MYSQL_DATABASE=mediawiki
       - MARIADB_DATABASE=semorg
       - MYSQL_USER=mediawiki
       - MARIADB_USER=semorg
       - MYSQL_PASSWORD=secret
       - MARIADB_PASSWORD=<YOURDBPASSWORD>
     logging:
     logging:
       options:
       options:
         max-size: 50m
         max-size: 50m
</pre>
</pre>
build and start container:
sudo docker-compose up -d


=== Additional Extensions ===
=== Additional Extensions ===

Revision as of 07:40, 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 ...

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