From ca701632e19f0fd8301cd8fd38a46649199e6bd3 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 10:16:57 +0200 Subject: [PATCH] 'Add new script' (#6534) Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> --- ct/headers/tududi | 6 +++ ct/tududi.sh | 72 ++++++++++++++++++++++++++++++ frontend/public/json/tududi.json | 44 ++++++++++++++++++ install/tududi-install.sh | 76 ++++++++++++++++++++++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 ct/headers/tududi create mode 100644 ct/tududi.sh create mode 100644 frontend/public/json/tududi.json create mode 100644 install/tududi-install.sh diff --git a/ct/headers/tududi b/ct/headers/tududi new file mode 100644 index 000000000..17ec52284 --- /dev/null +++ b/ct/headers/tududi @@ -0,0 +1,6 @@ + ______ __ ___ + /_ __/_ ______/ /_ ______/ (_) + / / / / / / __ / / / / __ / / + / / / /_/ / /_/ / /_/ / /_/ / / +/_/ \__,_/\__,_/\__,_/\__,_/_/ + diff --git a/ct/tududi.sh b/ct/tududi.sh new file mode 100644 index 000000000..913214411 --- /dev/null +++ b/ct/tududi.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://tududi.com + +APP="Tududi" +var_tags="${var_tags:-todo-app}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +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/tududi ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -fsSL https://api.github.com/repos/chrisvel/tududi/releases/latest | yq '.tag_name' | sed 's/^v//') + if [[ "${RELEASE}" != "$(cat ~/.tududi 2>/dev/null)" ]] || [[ ! -f ~/.tududi ]]; then + msg_info "Stopping Service" + systemctl stop tududi + msg_ok "Stopped Service" + + msg_info "Remove and backup Files" + cp /opt/tududi/backend/.env /opt/tududi.env + rm -rf /opt/tududi/backend/dist + msg_ok "Backup and removed Files" + + fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" + + msg_info "Updating ${APP}" + cd /opt/tududi + $STD npm install + export NODE_ENV=production + $STD npm run frontend:build + mv ./dist ./backend + mv ./public/locales ./backend/dist + mv ./public/favicon.* ./backend/dist + mv /opt/tududi.env /opt/tududi/.env + msg_ok "Updated $APP" + + msg_info "Starting Service" + systemctl start tududi + msg_ok "Started Service" + msg_ok "Updated Successfully" + else + msg_ok "Already up to date" + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:3002${CL}" diff --git a/frontend/public/json/tududi.json b/frontend/public/json/tududi.json new file mode 100644 index 000000000..a82ec5810 --- /dev/null +++ b/frontend/public/json/tududi.json @@ -0,0 +1,44 @@ +{ + "name": "Tududi", + "slug": "tududi", + "categories": [ + 12 + ], + "date_created": "2025-07-22", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3002, + "documentation": null, + "config_path": "/opt/tududi/backend/.env", + "website": "https://tududi.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tududi.webp", + "description": "Self-hosted task management with functional programming architecture, hierarchical organization, and multi-language support.", + "install_methods": [ + { + "type": "default", + "script": "ct/tududi.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Create users like this: `cd /opt/tududi` => `npm run user:create `", + "type": "info" + }, + { + "text": "Database location: `/opt/tududi-db`. Uploads: `/opt/tududi-uploads`", + "type": "info" + } + ] +} diff --git a/install/tududi-install.sh b/install/tududi-install.sh new file mode 100644 index 000000000..d89d8c3d2 --- /dev/null +++ b/install/tududi-install.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +# Copyright (c) 2025 Community Scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://tududi.com/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + sqlite3 \ + yq +msg_ok "Installed Dependencies" + +NODE_VERSION="20" setup_nodejs +fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" + +msg_info "Configuring Tududi" +cd /opt/tududi +$STD npm install +export NODE_ENV=production +$STD npm run frontend:build +mv ./dist ./backend +mv ./public/locales ./backend/dist +mv ./public/favicon.* ./backend/dist +msg_ok "Configured Tududi" + +msg_info "Creating env and database" +DB_LOCATION="/opt/tududi-db" +UPLOAD_DIR="/opt/tududi-uploads" +mkdir -p {"$DB_LOCATION","$UPLOAD_DIR"} +SECRET="$(openssl rand -hex 64)" +sed -e 's/^GOOGLE/# &/' \ + -e '/TUDUDI_SESSION/s/^# //' \ + -e '/NODE_ENV/s/^# //' \ + -e "s/your_session_secret_here/$SECRET/" \ + -e 's/development/production/' \ + -e "\$a\DB_FILE=$DB_LOCATION/production.sqlite3" \ + -e "\$a\TUDUDI_UPLOAD_PATH=$UPLOAD_DIR" \ + /opt/tududi/backend/.env.example >/opt/tududi/backend/.env +export DB_FILE="$DB_LOCATION/production.sqlite3" +$STD npm run db:init +msg_ok "Created env and database" + +msg_info "Creating service" +cat </etc/systemd/system/tududi.service +[Unit] +Description=Tududi Service +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/tududi +EnvironmentFile=/opt/tududi/backend/.env +ExecStart=/usr/bin/npm run start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now tududi +msg_ok "Created service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"