From 7e4524a76975b6eb227eab8bfca488ef7889ca29 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 10:53:22 +0100 Subject: [PATCH] Ideon (#18915) * Add ideon (ct) * rm Python3 dep --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com> --- ct/ideon.sh | 67 +++++++++++++++++++++++++++++++ install/ideon-install.sh | 85 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 ct/ideon.sh create mode 100644 install/ideon-install.sh diff --git a/ct/ideon.sh b/ct/ideon.sh new file mode 100644 index 000000000..45c48142f --- /dev/null +++ b/ct/ideon.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +_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: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/3xpyth0n/ideon + +APP="Ideon" +var_tags="${var_tags:-notes;canvas;collaboration}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-yes}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/ideon ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + $STD sudo -u postgres psql -c "ALTER ROLE ideon BYPASSRLS;" + + if check_for_gh_release "ideon" "3xpyth0n/ideon"; then + msg_info "Stopping Ideon" + systemctl stop ideon + msg_ok "Stopped Ideon" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ideon" "3xpyth0n/ideon" "tarball" + + msg_info "Building Ideon" + cd /opt/ideon + $STD npm ci + NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production IS_NEXT_BUILD=1 $STD npm run build + $STD npm prune --omit=dev + rm -rf /opt/ideon/.next/cache ~/.npm + ln -s /opt/ideon_data/storage /opt/ideon/storage + msg_ok "Built Ideon" + + msg_info "Starting Ideon" + systemctl start ideon + msg_ok "Started Ideon" + msg_ok "Updated successfully!" + fi + 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 "${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/ideon-install.sh b/install/ideon-install.sh new file mode 100644 index 000000000..45fb20e25 --- /dev/null +++ b/install/ideon-install.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/3xpyth0n/ideon + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt install -y build-essential +msg_ok "Installed Dependencies" + +NODE_VERSION="24" setup_nodejs +PG_VERSION="18" setup_postgresql +PG_DB_NAME="ideon" PG_DB_USER="ideon" setup_postgresql_db +$STD sudo -u postgres psql -c "ALTER ROLE ideon BYPASSRLS;" + +fetch_and_deploy_gh_release "ideon" "3xpyth0n/ideon" "tarball" + +msg_info "Building Ideon" +cd /opt/ideon +$STD npm ci +NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production IS_NEXT_BUILD=1 $STD npm run build +$STD npm prune --omit=dev +rm -rf /opt/ideon/.next/cache ~/.npm +msg_ok "Built Ideon" + +msg_info "Configuring Ideon" +mkdir -p /opt/ideon_data/storage/{avatars,uploads,yjs} +cat </opt/ideon_data/.env +NODE_ENV=production +APP_PORT=3000 +APP_URL=http://${LOCAL_IP}:3000 +AUTH_TRUST_HOST=true +TIMEZONE=UTC +LOG_LEVEL=info +DB_HOST=localhost +DB_PORT=5432 +DB_NAME=ideon +DB_USER=ideon +DB_PASS=${PG_DB_PASS} +SECRET_KEY=$(openssl rand -hex 32) +SMTP_FROM_EMAIL= +SMTP_FROM_NAME= +SMTP_HOST= +SMTP_USER= +SMTP_PASSWORD= +SMTP_PORT= +SMTP_USE_TLS=true +EOF +chmod 600 /opt/ideon_data/.env +msg_ok "Configured Ideon" + +msg_info "Creating Service" +cat </etc/systemd/system/ideon.service +[Unit] +Description=Ideon +After=network.target postgresql.service +Requires=postgresql.service + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/ideon +EnvironmentFile=/opt/ideon_data/.env +ExecStart=/usr/bin/node dist/server.cjs +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ideon +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc