2025-01-01 22:55:11 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
|
|
|
# Author: MickLesk
|
|
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
|
|
|
# Source: https://komo.do/
|
|
|
|
|
|
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
|
|
|
color
|
|
|
|
|
verb_ip6
|
|
|
|
|
catch_errors
|
|
|
|
|
setting_up_container
|
|
|
|
|
network_check
|
|
|
|
|
update_os
|
|
|
|
|
|
|
|
|
|
msg_info "Setup Docker Repository"
|
Bump K to H-Scripts to Debian 13 (Trixie) (#8597)
* Update scripts to use Debian 13 and improve update logic
Bump default container OS version from Debian 12 to 13 across multiple LXC setup scripts. Refactor update_script functions for consistency, improve messaging, and standardize apt usage. Update Kimai install and update scripts to use setup_php, setup_composer, and fetch_and_deploy_gh_release helpers, and switch from MySQL to MariaDB. Update Kometa to use Python 3.13. Minor improvements to backup, cleanup, and service management steps in several scripts.
* Refactor install scripts: unify cleanup and apt usage
Replaces repeated apt-get commands with apt for installing dependencies, and consolidates cleanup steps into a single cleanup_lxc function across all install scripts. Also updates repository setup to use setup_deb822_repo where applicable, and makes minor improvements to dependency installation and service setup.
* Update default Debian version to 13 and refactor updates
Set the default Debian version to 13 across all container scripts. Standardize apt command usage by replacing 'apt-get' with 'apt' where appropriate. Remove redundant cleanup steps from update scripts and streamline update logic for consistency. Also, call 'cleanup_lxc' after 'update_script' in the build function.
* Update default OS version to Debian 13 in JSON configs
Updated the 'version' field from '12' to '13' for Debian-based install methods across multiple application JSON files. Also set default OS and version for inspircd. This ensures new containers use the latest supported Debian release.
* fix kimai Update Check
* grammar
* Correct typo in success message
* Fix typo in success message for update
* refactor
* fixed jenkins / improve komodo
---------
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-11-12 10:56:18 +01:00
|
|
|
setup_deb822_repo \
|
|
|
|
|
"docker" \
|
|
|
|
|
"https://download.docker.com/linux/$(get_os_info id)/gpg" \
|
|
|
|
|
"https://download.docker.com/linux/$(get_os_info id)" \
|
|
|
|
|
"$(get_os_info codename)" \
|
|
|
|
|
"stable" \
|
|
|
|
|
"$(dpkg --print-architecture)"
|
2025-01-01 22:55:11 +01:00
|
|
|
msg_ok "Setup Docker Repository"
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Docker"
|
Bump K to H-Scripts to Debian 13 (Trixie) (#8597)
* Update scripts to use Debian 13 and improve update logic
Bump default container OS version from Debian 12 to 13 across multiple LXC setup scripts. Refactor update_script functions for consistency, improve messaging, and standardize apt usage. Update Kimai install and update scripts to use setup_php, setup_composer, and fetch_and_deploy_gh_release helpers, and switch from MySQL to MariaDB. Update Kometa to use Python 3.13. Minor improvements to backup, cleanup, and service management steps in several scripts.
* Refactor install scripts: unify cleanup and apt usage
Replaces repeated apt-get commands with apt for installing dependencies, and consolidates cleanup steps into a single cleanup_lxc function across all install scripts. Also updates repository setup to use setup_deb822_repo where applicable, and makes minor improvements to dependency installation and service setup.
* Update default Debian version to 13 and refactor updates
Set the default Debian version to 13 across all container scripts. Standardize apt command usage by replacing 'apt-get' with 'apt' where appropriate. Remove redundant cleanup steps from update scripts and streamline update logic for consistency. Also, call 'cleanup_lxc' after 'update_script' in the build function.
* Update default OS version to Debian 13 in JSON configs
Updated the 'version' field from '12' to '13' for Debian-based install methods across multiple application JSON files. Also set default OS and version for inspircd. This ensures new containers use the latest supported Debian release.
* fix kimai Update Check
* grammar
* Correct typo in success message
* Fix typo in success message for update
* refactor
* fixed jenkins / improve komodo
---------
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-11-12 10:56:18 +01:00
|
|
|
$STD apt install -y \
|
2025-01-01 22:55:11 +01:00
|
|
|
docker-ce \
|
|
|
|
|
docker-ce-cli \
|
|
|
|
|
containerd.io \
|
|
|
|
|
docker-buildx-plugin \
|
|
|
|
|
docker-compose-plugin
|
|
|
|
|
msg_ok "Installed Docker"
|
|
|
|
|
|
2025-05-15 11:13:57 +02:00
|
|
|
echo "${TAB3}Choose the database for Komodo installation:"
|
|
|
|
|
echo "${TAB3}1) MongoDB (recommended)"
|
2025-07-04 11:40:07 +02:00
|
|
|
echo "${TAB3}2) FerretDB"
|
2025-05-15 11:13:57 +02:00
|
|
|
read -rp "${TAB3}Enter your choice (default: 1): " DB_CHOICE
|
2025-01-01 22:55:11 +01:00
|
|
|
DB_CHOICE=${DB_CHOICE:-1}
|
|
|
|
|
|
|
|
|
|
case $DB_CHOICE in
|
2025-03-24 14:20:56 +01:00
|
|
|
1)
|
|
|
|
|
DB_COMPOSE_FILE="mongo.compose.yaml"
|
|
|
|
|
;;
|
|
|
|
|
2)
|
2025-07-04 11:40:07 +02:00
|
|
|
DB_COMPOSE_FILE="ferretdb.compose.yaml"
|
2025-03-24 14:20:56 +01:00
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
echo "Invalid choice. Defaulting to MongoDB."
|
|
|
|
|
DB_COMPOSE_FILE="mongo.compose.yaml"
|
|
|
|
|
;;
|
2025-01-01 22:55:11 +01:00
|
|
|
esac
|
|
|
|
|
mkdir -p /opt/komodo
|
|
|
|
|
cd /opt/komodo
|
2025-05-28 14:45:53 +02:00
|
|
|
curl -fsSL "https://raw.githubusercontent.com/moghtech/komodo/main/compose/$DB_COMPOSE_FILE" -o "/opt/komodo/$DB_COMPOSE_FILE"
|
2025-01-01 22:55:11 +01:00
|
|
|
|
|
|
|
|
msg_info "Setup Komodo Environment"
|
2025-04-11 13:00:02 +07:00
|
|
|
curl -fsSL "https://raw.githubusercontent.com/moghtech/komodo/main/compose/compose.env" -o "/opt/komodo/compose.env"
|
2025-01-01 22:55:11 +01:00
|
|
|
DB_PASSWORD=$(openssl rand -base64 16 | tr -d '/+=')
|
2025-08-25 19:10:41 +02:00
|
|
|
ADMIN_PASSWORD=$(openssl rand -base64 8 | tr -d '/+=')
|
2025-01-01 22:55:11 +01:00
|
|
|
PASSKEY=$(openssl rand -base64 24 | tr -d '/+=')
|
|
|
|
|
WEBHOOK_SECRET=$(openssl rand -base64 24 | tr -d '/+=')
|
|
|
|
|
JWT_SECRET=$(openssl rand -base64 24 | tr -d '/+=')
|
|
|
|
|
|
2025-03-29 08:43:36 +01:00
|
|
|
sed -i "s/^KOMODO_DB_USERNAME=.*/KOMODO_DB_USERNAME=komodo_admin/" /opt/komodo/compose.env
|
2025-03-29 20:44:56 +01:00
|
|
|
sed -i "s/^KOMODO_DB_PASSWORD=.*/KOMODO_DB_PASSWORD=${DB_PASSWORD}/" /opt/komodo/compose.env
|
2025-08-25 19:10:41 +02:00
|
|
|
sed -i "s/^KOMODO_INIT_ADMIN_PASSWORD=changeme/KOMODO_INIT_ADMIN_PASSWORD=${ADMIN_PASSWORD}/" /opt/komodo/compose.env
|
2025-03-29 08:43:36 +01:00
|
|
|
sed -i "s/^KOMODO_PASSKEY=.*/KOMODO_PASSKEY=${PASSKEY}/" /opt/komodo/compose.env
|
2025-01-01 22:55:11 +01:00
|
|
|
sed -i "s/^KOMODO_WEBHOOK_SECRET=.*/KOMODO_WEBHOOK_SECRET=${WEBHOOK_SECRET}/" /opt/komodo/compose.env
|
|
|
|
|
sed -i "s/^KOMODO_JWT_SECRET=.*/KOMODO_JWT_SECRET=${JWT_SECRET}/" /opt/komodo/compose.env
|
2025-08-25 19:10:41 +02:00
|
|
|
{
|
|
|
|
|
echo "Komodo Credentials"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Admin User : admin"
|
|
|
|
|
echo "Admin Password: $ADMIN_PASSWORD"
|
|
|
|
|
} >>~/komodo.creds
|
2025-01-01 22:55:11 +01:00
|
|
|
msg_ok "Setup Komodo Environment"
|
|
|
|
|
|
|
|
|
|
msg_info "Initialize Komodo"
|
|
|
|
|
$STD docker compose -p komodo -f /opt/komodo/$DB_COMPOSE_FILE --env-file /opt/komodo/compose.env up -d
|
|
|
|
|
msg_ok "Initialized Komodo"
|
|
|
|
|
|
|
|
|
|
motd_ssh
|
|
|
|
|
customize
|
Bump K to H-Scripts to Debian 13 (Trixie) (#8597)
* Update scripts to use Debian 13 and improve update logic
Bump default container OS version from Debian 12 to 13 across multiple LXC setup scripts. Refactor update_script functions for consistency, improve messaging, and standardize apt usage. Update Kimai install and update scripts to use setup_php, setup_composer, and fetch_and_deploy_gh_release helpers, and switch from MySQL to MariaDB. Update Kometa to use Python 3.13. Minor improvements to backup, cleanup, and service management steps in several scripts.
* Refactor install scripts: unify cleanup and apt usage
Replaces repeated apt-get commands with apt for installing dependencies, and consolidates cleanup steps into a single cleanup_lxc function across all install scripts. Also updates repository setup to use setup_deb822_repo where applicable, and makes minor improvements to dependency installation and service setup.
* Update default Debian version to 13 and refactor updates
Set the default Debian version to 13 across all container scripts. Standardize apt command usage by replacing 'apt-get' with 'apt' where appropriate. Remove redundant cleanup steps from update scripts and streamline update logic for consistency. Also, call 'cleanup_lxc' after 'update_script' in the build function.
* Update default OS version to Debian 13 in JSON configs
Updated the 'version' field from '12' to '13' for Debian-based install methods across multiple application JSON files. Also set default OS and version for inspircd. This ensures new containers use the latest supported Debian release.
* fix kimai Update Check
* grammar
* Correct typo in success message
* Fix typo in success message for update
* refactor
* fixed jenkins / improve komodo
---------
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-11-12 10:56:18 +01:00
|
|
|
cleanup_lxc
|