Has anyone been able to install xwiki on TrueNAS Scale? I’ve found a good article on how to install it with Docker and Portainer on Synology and that’s as close as I’ve come.
I think this would be a great app to have available on this platform.
I meant to add the link to the article, whoops.
Wouldn’t call mariushosting “a good article” on anything, but skipping ranting I’ve been able to run xwiki using example from their own docs from Truenas UI without modifications. On Applications page click Discover / Custom / Install from YAML and enter
custom config content
version: '2'
networks:
bridge:
driver: bridge
services:
web:
image: "xwiki:stable-postgres-tomcat"
container_name: xwiki-postgres-tomcat-web
depends_on:
- db
ports:
- "8080:8080"
environment:
- DB_USER=xwiki
- DB_PASSWORD=xwiki
- DB_HOST=xwiki-postgres-db
volumes:
- xwiki-data:/usr/local/xwiki
networks:
- bridge
db:
image: "postgres:17"
container_name: xwiki-postgres-db
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_ROOT_PASSWORD=xwiki
- POSTGRES_PASSWORD=xwiki
- POSTGRES_USER=xwiki
- POSTGRES_DB=xwiki
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale-provider=builtin --locale=C.UTF-8
networks:
- bridge
volumes:
postgres-data: {}
xwiki-data: {}
This is not very good setup (read: non-idiomatic for truenas and docker in general). It runs from root, doesn’t use secrets and preferably be configured to use host paths instead of named volumes, but it runs. It also eats 1.5-2 GB of RAM from the start, launches background libreoffice for some reason and nags to install some “preset” which I had no patience to wait for. Maybe it can find it’s place in some enterprise, considering they claim to be better than Confluence and trying to sell pro support, but for personal usage I’d rather pick dokuwiki (arguably most lightweight), mediawiki (closest to wikipedia experience) or wiki.js (most modern interface).
His article seemed pretty straight forward and easy to follow, that makes it good in my book. Just ignore all the requests for money.
Is that a failure of the software, or with the deploy scheme you used?
It looks like they offer a more full featured version of their compose file here.
None of those options are available in the repository either.
How would I deploy those? I’m not any good with figuring out those yaml files.
Okay, if I want to try installing this with that other compose file it says I need to put a .env file in the same directory as the compose file.
Anyone know where they’re stored? I looked around the file system and couldn’t find any for the other apps I’ve installed.
Okay, I learned a few things. The TrueNAS yaml files cannot make use of external files to replace variables within them. At least I couldn’t get them to work and I know almost nothing so there’s that. I did create an init.sql file though.
Anyway, I was able to get a fully working xwiki install using this as the compose file. Yes, it does use a fair amount of RAM, but at least it’s not thrashing the CPU:
networks:
bridge:
driver: bridge
services:
db:
command:
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_bin'
- '--explicit-defaults-for-timestamp=1'
container_name: xwiki-mysql-db
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=xwiki
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=xwiki
image: mysql:8.3
networks:
- bridge
volumes:
- /mnt/LCARS/Applications/xwiki/db:/var/lib/mysql
- /mnt/.ix-apps/app_configs/xwiki/init.sql:/docker-entrypoint-initdb.d/init.sql
web:
container_name: xwiki-mysql-tomcat-web
depends_on:
- db
environment:
- XWIKI_VERSION=16.10.4
- DB_USER=xwiki
- DB_PASSWORD= password
- DB_DATABASE= xwiki
- DB_HOST=xwiki-mysql-db
image: xwiki:16.10.4-mysql-tomcat
networks:
- bridge
ports:
- '8080:8080'
volumes:
- /mnt/LCARS/Applications/xwiki:/usr/local/xwiki
version: '2'
volumes:
mysql-data: {}
xwiki-data: {}
I was able to get a dokuwiki installed, but I can’t find a way to log in as an administer so it’s pretty useless.
You should be able to delete the last 4 lines. Ie version and volumes.
I made a mistake in the original compose file I created above and it looks like once you create an application you can’t make changes to those files.
I decided to try and make a better version of the install file, so after a bunch of searching I created a dataset for xwiki with more folders inside, “files, data, & db”.
Then I went to the xwiki repository and pulled all the files from the version I wanted to install and put them in the ‘files’ folder.
I only had to change 3 lines in the compose file, I pointed the 2 containers to the ‘data’ and ‘db’ folders, and pointed the ‘init.sql’ file down one directory inside the mysql folder.
Doing it this way allowed the compose file to reference all the external files for the build.
The actual custom config in TrueNAS is just:
include:
- /mnt/LCARS/Applications/x_wiki/files/docker-compose.yml