206Xwiki - amagerard/Docker GitHub Wiki
Docker/Home
Ubuntu/Casaos.
1-Casaos | 2- Portainer | 3- Drupal | 4- Joomla | 5-Wordpress |
---|---|---|---|---|
6-Xwiki | 7- Mediawiki | 8- Httpd | ||
Docker | Zimaos |
6. Xwiki.
Xwiki is a collaborative platform and written in Java.
This procedure is based on this example.
Ubuntu ip : 192.168.60.8/24
Casaos version: v0.4.15
Your username: teacher
Your home directory:/home/teacher
6.1 Create Network and Volumes with Portainer.
Open Portainer for create network and volumes.
http://192.168.60.8:9000
Click on Environments Local.
6.1.1 Each Xwiki instance has its container.
- cnt_xki_wb_number.
- cnt_xki_db_number.
Containers will be created from Casaos graphical interface.
6.1.2 Each Xwiki instance has its network.
- net_xki_number.
Createnet_xki_1
.
Select Networks.
Add network.
Name : net_xki_1
Add Driver options:
Name : com.docker.network.bridge.name value : net_xki_1
Create the network.
Name: com.docker.network.bridge.name value : net_xki_1
is not specified, docker will give it a name as br-XXXX
.
6.1.3 Each Xwiki instance has its volume.
- vol_xki_wb_number.
- vol_xki_db_number.
Create these volumes.
Select Volumes.
Add volume.
Name: vol_xki_wb_1
Create the volume.
Add the volume.
Name: vol_xki_db_1
Create the volume.
6.2 Install Xwiki with a yaml script.
Copy this script in notepad, kate, gedit or another text editor
and save with a name that has a yaml extension.
# 2025, January
# replace number by 1 or 2 or ... until 9
# example n = 1
# port published wb = 8081
# port published db = 33771
# ip = 192.168.60.8
# your username is teacher
# you must create network net_xki_1 from portainer before installing xwiki.
# you must create volume vol_xki_wb_1 from portainer before installing xwiki.
# you must create volume vol_xki_db_1 from portainer before installing xwiki.
# you must upload init.sql file under /DATA/Documents/docker/files before installing xwiki
#
# vi /DATA/Documents/docker/files/init.sql
# grant all privileges on *.* to xwiki@'%' identified by 'xwiki'
#
# you can modify /DATA/Documents/docker/init.sql but not delete it.
#
# Be careful with the tab, the indentation is 4 characters.
#
name: xwiki_1 ## change n of xwiki_n
services:
xwiki:
cpu_shares: 90
command: []
container_name: cnt_xki_wb_1 ## change n of cnt_xki_wb_n
depends_on:
xwikidb:
condition: service_started
restart: true
required: true
deploy:
resources:
limits:
memory: 3072M
environment:
- DB_USER=xwiki
- DB_PASSWORD=xwiki
- DB_DATABASE=xwiki
- DB_HOST=cnt_xki_db_1
- JAVA_OPTS=-Xmx2048m
hostname: cnt_xki_wb_1 ## change n to cnt_xki_wb_n
image: xwiki:stable-mariadb-tomcat
links:
- xwikidb:mariadb
ports:
- target: 8080
published: '8081' ## change n of 808n
protocol: tcp
restart: always
volumes:
- /var/lib/docker/volumes/vol_xki_wb_1/_data:/usr/local/xwiki # create volume from portainer and change n of vol_xki_wb_n
devices: []
cap_add: []
network_mode: net_xki_1 # create network from portainer and change n of net_xki_n
privileged: false
xwikidb:
cpu_shares: 90
container_name: cnt_xki_db_1 ## change n of cnt_xki_db_n
command:
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_bin'
- '--explicit-defaults-for-timestamp=1'
deploy:
resources:
limits:
memory: 3072M
environment:
- MYSQL_ROOT_PASSWORD=xwiki
- MYSQL_USER=xwiki
- MYSQL_PASSWORD=xwiki
- MYSQL_DATABASE=xwiki
hostname: cnt_xki_db_1 ## change n of cnt_xki_db_n
image: mariadb:latest
ports:
- target: 3306
published: '33771' ## change n to 3377n
protocol: tcp
restart: always
volumes:
- /var/lib/docker/volumes/vol_xki_db_1/_data:/var/lib/mysql ## create volume from portainer and change n of vol_xki_db_n
- /DATA/Documents/docker/files:/docker-entrypoint-initdb.d # upload init.sql file before on /DATA/Documents/docker/files/ from Casaos GUI
devices: []
cap_add: []
network_mode: net_xki_1 # create network from portainer and change n of net_xki_1
privileged: false
x-casaos:
author: self
category: self
hostname: 192.168.60.8 ## change IP
icon: https://www.xwiki.org/xwiki/bin/download/Main/Logo/XWiki-logo-color.png # check if existe
index: /
is_uncontrolled: false
port_map: '8081' ## change n of 808n
scheme: http
store_app_id: xwiki_1 ## change n of xwiki_n
title:
custom: xwiki_1 ## change n of xwiki_n
Information.
If you want to change your wordpress instance in 2
,
edit this file and replace _1
by _2
.
Then replace the port 8081
by 8082
and 33771
by 33772
.
Xwiki needs to give the ‹ grant all Privileges › authorizations to the xwiki user to create new schemas.
Edit init.sql with notepad, kate, gedit or another text editor
and save on your home.
The contents of the init.sql file are:
grant all privileges on *.* to xwiki@'%' identified by 'xwiki'
6.2.1 Upload init.sql.
Open Casaos.
http://192.168.60.8
.
Click on File icon.
Then in Documents.
Right Click and choose New folder.
Name: docker
Not shared - Submit.
Then in docker
folder.
Right Click and choose New folder.
Name: files
.
Not shared - Submit.
Then in files
folder.
Right Click and choose Uploads init.sql file.
you can modify init.sql
but not delete it.
6.2.2 install Xwiki.
Open casaos.
http://192.168.60.8
Click on the "+" which is located in the middle right of the browser web page.
install a customized app.
Click on right top who name "import".
Import.
Click on Drag your Docker Compose here or click to upload
.
Search your script yaml .
Submit.
OK and OK.
Install.
6.3 Attach volumes with containers.
On portainer, by default the volumes are marked Unused.
Open Portainer.
http://192.168.60.8:9000
Click on Environments Local.
Select Container cnt_xki_wb_1
.
Stop cnt_xki_wb_1
.
Click on cnt_xki_wb_1
.
Click on Duplicate/Edit
.
Advanced container settings
.
Click on Volumes
.
Volumes mapping.
Choose container /usr/local/xwiki
.
Click on Volume.
Select a Volume.
Choose vol_xki_wb_1 - local
.
Click on Deploy the container
.
Click on Replace
.
Select Container cnt_xki_db_1
.
Stop cnt_xki_db_1
.
Click on cnt_xki_db_1
.
Click on Duplicate/Edit
.
Advanced container settings
.
Click on Volumes
.
Volumes mapping.
Choose container /val/lib/mysql
.
Click on Volume.
Select a Volume.
Choose vol_xki_db_1 - local
.
Click on Deploy the container
.
Click on Replace
.
6.4 First access Xwiki.
http://192.168.60.8:8081
Loading Xwiki 11% up to 50%.
First page: Distribution wizard Continue
.
Step 1 - Admin user.
FIRST NAME:admin
.
LAST NAME:xwiki
.
USERNAME:adminxwiki
.
PASSWORD and CONFIRM PASSWORD:as you want
.
EMAIL ADDRESS:as you want
.
Register and login.
Step 1 - Admin user:You are connected with user admin xwiki.
Continue.
Step 2 - Flavor.
Press the F5 key to update the page (if nothing on the screen).
Step 2 - Flavor.
Click on gray color XWiki Standard Flavor
.
Install this flavor.
Install.
Continue.
The installation takes a long time.
Continue.
Wait a little time.
Step 5 - Report.
Continue.
Wait a little time.
Welcome to XWiki:Next
After 7 Next
and End tour
.
To change the localization.
Click on the Icon Drawer
on the top right corner.
Select Administer Wiki
.
Select Content
.
Select Localization
.
Change DEFAULT LANGUAGE
and TIMEZONE
.
Save.
Xwiki is ready.