This guide provides a full Ansible playbook to deploy Sicekit with Docker Compose on Debian 10+, Ubuntu LTS, and RHEL 9+ compatible hosts.
- name: Deploy Sicekit
hosts: sicekit
become: true
vars:
app_root: /opt/sicekit
app_port: 8080
tasks:
- name: Install Docker on Debian/Ubuntu
apt:
name:
- docker.io
- docker-compose-plugin
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install Docker on RHEL family
dnf:
name:
- docker
- docker-compose-plugin
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start Docker
service:
name: docker
state: started
enabled: true
- name: Create application directory
file:
path: "{{ app_root }}"
state: directory
mode: "0755"
- name: Write Docker Compose file for MediaWiki (Sicekit runs on top of MediaWiki)
copy:
dest: "{{ app_root }}/docker-compose.yml"
mode: "0644"
content: |
services:
db:
image: mariadb:10.6
restart: unless-stopped
environment:
MYSQL_DATABASE: mediawiki
MYSQL_USER: mediawiki
MYSQL_PASSWORD: change-me
MYSQL_ROOT_PASSWORD: change-me
volumes:
- db-data:/var/lib/mysql
mediawiki:
image: mediawiki:latest
restart: unless-stopped
depends_on:
- db
ports:
- "{{ app_port }}:80"
volumes:
- mediawiki-html:/var/www/html
volumes:
db-data:
mediawiki-html:
- name: Note about Sicekit installation
debug:
msg: "Sicekit extensions must be manually installed on top of MediaWiki. Clone from https://github.com/sicekit/sicekit and copy extensions/templates to the MediaWiki volume."
- name: Start application stack
command: docker compose up -d
args:
chdir: "{{ app_root }}"
We develop tailored automation solutions for:
Let’s discuss your requirements: office@linux-server-admin.com | Contact