diff --git a/ct/xwiki.sh b/ct/xwiki.sh new file mode 100644 index 0000000000..f9b59c346b --- /dev/null +++ b/ct/xwiki.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: freakms +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://www.xwiki.org + +APP="XWiki" +var_tags="${var_tags:-wiki}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-16}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" +var_arm64="${var_arm64:-no}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /etc/xwiki/xwiki.cfg ]]; then + msg_error "No XWiki Installation Found!" + exit + fi + + msg_info "Stopping XWiki" + systemctl stop tomcat10 + msg_ok "Stopped XWiki" + + create_backup /etc/xwiki + + msg_info "Updating XWiki" + apt_update_safe + $STD apt install -y --only-upgrade -o Dpkg::Options::=--force-confold \ + xwiki-common xwiki-pgsql-common xwiki-tomcat10-common xwiki-tomcat10-pgsql + msg_ok "Updated XWiki" + + restore_backup + + msg_info "Starting XWiki" + systemctl start tomcat10 + msg_ok "Started XWiki" + msg_ok "Updated successfully!" + exit +} + +start +build_container +description + +msg_ok "Completed successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/xwiki${CL}" diff --git a/install/xwiki-install.sh b/install/xwiki-install.sh new file mode 100644 index 0000000000..aefdd8cd69 --- /dev/null +++ b/install/xwiki-install.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: freakms +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://www.xwiki.org + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +setup_postgresql + +setup_deb822_repo \ + "xwiki" \ + "https://maven.xwiki.org/xwiki-keyring.gpg" \ + "https://maven.xwiki.org" \ + "stable/" + +msg_info "Installing XWiki" +debconf-set-selections <>/etc/default/tomcat10 +JAVA_OPTS="-Djava.awt.headless=true -Xmx${XWIKI_XMX}m -XX:+UseG1GC" +EOF +systemctl restart tomcat10 +msg_ok "Configured XWiki" + +motd_ssh +customize +cleanup_lxc diff --git a/json/xwiki.json b/json/xwiki.json new file mode 100644 index 0000000000..999b689dd6 --- /dev/null +++ b/json/xwiki.json @@ -0,0 +1,52 @@ +{ + "name": "XWiki", + "slug": "xwiki", + "categories": [12], + "date_created": "2026-11-10", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://www.xwiki.org/xwiki/bin/view/Documentation/", + "website": "https://www.xwiki.org/", + "repository": "https://github.com/xwiki/xwiki-platform", + "architectures": ["amd64"], + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/xwiki.webp", + "description": "XWiki is a free, open source wiki platform written in Java. It offers structured data, applications inside the wiki, a powerful extension system and fine-grained permissions, and is a common alternative to Confluence.", + "install_methods": [ + { + "type": "default", + "script": "ct/xwiki.sh", + "config_path": "/etc/xwiki/xwiki.cfg", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 16, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "On first start open http://:8080/xwiki/ and finish the Distribution Wizard: create the admin account and install the XWiki Standard flavor. This takes a few minutes.", + "type": "info" + }, + { + "text": "The PostgreSQL database and its random password are created by the Debian package; the connection is stored in /etc/xwiki/hibernate.cfg.xml.", + "type": "info" + }, + { + "text": "The Java heap is set to about 60 % of the container RAM in /etc/default/tomcat10. XWiki needs at least 2 GiB, 4 GiB is recommended.", + "type": "info" + }, + { + "text": "Take a snapshot or backup before updating; major XWiki upgrades finish with the Distribution Wizard in the browser.", + "type": "warning" + } + ] +}