From 154e450a4464447f42e0e9c8f8de8f6adc95cf52 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 16 Jul 2025 17:20:10 -0400 Subject: [PATCH 1/9] New script: Tududi --- ct/tududi.sh | 71 +++++++++++++++++++++++++++++++ frontend/public/json/tududi.json | 40 +++++++++++++++++ install/tududi-install.sh | 73 ++++++++++++++++++++++++++++++++ 3 files changed, 184 insertions(+) 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/tududi.sh b/ct/tududi.sh new file mode 100644 index 00000000..7aa6375a --- /dev/null +++ b/ct/tududi.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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:-1024}" +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 "Upadting ${APP}" + cp /opt/"$APP"/backend/.env /opt/"$APP".env + rm -rf /opt/"$APP" + fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" + + cd /opt/"$APP" + $STD npm install + export NODE_ENV=production + $STD npm run frontend:build + cp -r ./dist ./backend/dist + cp -r ./public/locales ./backend/dist/locales + mv /opt/"$APP".env /opt/"$APP"/.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 "${ADVANCED}${BL}Create your initial user in${CL} ${BGN}/opt/${APP}${CL}${BL} in the LXC:${CL}" +echo -e "${TAB3}${BL}npm run user:create ${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 00000000..fb06bb9e --- /dev/null +++ b/frontend/public/json/tududi.json @@ -0,0 +1,40 @@ +{ + "name": "Tududi", + "slug": "tududi", + "categories": [ + 12 + ], + "date_created": "2025-07-07", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3002, + "documentation": null, + "config_path": "/", + "website": "https://tududi.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/notesnook.webp", + "description": "Notesnook is a free (as in speech) & open-source note-taking app focused on user privacy & ease of use. To ensure zero knowledge principles, Notesnook encrypts everything on your device using XChaCha20-Poly1305 & Argon2.", + "install_methods": [ + { + "type": "default", + "script": "ct/tududi.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "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" + } + ] +} diff --git a/install/tududi-install.sh b/install/tududi-install.sh new file mode 100644 index 00000000..a9268d21 --- /dev/null +++ b/install/tududi-install.sh @@ -0,0 +1,73 @@ +#!/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 +msg_ok "Installed Dependencies" + +NODE_VERSION="20" setup_nodejs + +msg_info "Installing Tududi" +fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" +cd /opt/"$APPLICATION" +$STD npm install +export NODE_ENV=production +$STD npm run frontend:build +cp -r ./dist ./backend/dist +cp -r ./public/locales ./backend/dist/locales +msg_ok "Installed Tududi" + +msg_info "Creating config 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\UPLOAD_LOCATION=$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 config 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" From 4fc97ca1df781cef4f6cc2372ff564ff4505568c Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 16 Jul 2025 17:33:42 -0400 Subject: [PATCH 2/9] Fix icon --- frontend/public/json/tududi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/tududi.json b/frontend/public/json/tududi.json index fb06bb9e..080f210e 100644 --- a/frontend/public/json/tududi.json +++ b/frontend/public/json/tududi.json @@ -12,7 +12,7 @@ "documentation": null, "config_path": "/", "website": "https://tududi.com/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/notesnook.webp", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tududi.webp", "description": "Notesnook is a free (as in speech) & open-source note-taking app focused on user privacy & ease of use. To ensure zero knowledge principles, Notesnook encrypts everything on your device using XChaCha20-Poly1305 & Argon2.", "install_methods": [ { From cd36c5f8620fad3ba962eea7291960af4fd3a4ca Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 16 Jul 2025 17:40:54 -0400 Subject: [PATCH 3/9] Fix description; copy favicons --- ct/tududi.sh | 1 + frontend/public/json/tududi.json | 2 +- install/tududi-install.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/tududi.sh b/ct/tududi.sh index 7aa6375a..ee134713 100644 --- a/ct/tududi.sh +++ b/ct/tududi.sh @@ -45,6 +45,7 @@ function update_script() { $STD npm run frontend:build cp -r ./dist ./backend/dist cp -r ./public/locales ./backend/dist/locales + cp ./public/favicon.* ./backend/dist mv /opt/"$APP".env /opt/"$APP"/.env msg_ok "Updated $APP" diff --git a/frontend/public/json/tududi.json b/frontend/public/json/tududi.json index 080f210e..e02f7c63 100644 --- a/frontend/public/json/tududi.json +++ b/frontend/public/json/tududi.json @@ -13,7 +13,7 @@ "config_path": "/", "website": "https://tududi.com/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tududi.webp", - "description": "Notesnook is a free (as in speech) & open-source note-taking app focused on user privacy & ease of use. To ensure zero knowledge principles, Notesnook encrypts everything on your device using XChaCha20-Poly1305 & Argon2.", + "description": "Self-hosted task management with functional programming architecture, hierarchical organization, and multi-language support.", "install_methods": [ { "type": "default", diff --git a/install/tududi-install.sh b/install/tududi-install.sh index a9268d21..2b58d6eb 100644 --- a/install/tududi-install.sh +++ b/install/tududi-install.sh @@ -27,6 +27,7 @@ export NODE_ENV=production $STD npm run frontend:build cp -r ./dist ./backend/dist cp -r ./public/locales ./backend/dist/locales +cp ./public/favicon.* ./backend/dist msg_ok "Installed Tududi" msg_info "Creating config and database" From d9818797eeada22542e8893580017a2d0a369ddc Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 16 Jul 2025 17:42:19 -0400 Subject: [PATCH 4/9] Add config path to JSON --- frontend/public/json/tududi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/tududi.json b/frontend/public/json/tududi.json index e02f7c63..e8da8840 100644 --- a/frontend/public/json/tududi.json +++ b/frontend/public/json/tududi.json @@ -10,7 +10,7 @@ "privileged": false, "interface_port": 3002, "documentation": null, - "config_path": "/", + "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.", From 442c2b8a67ffb6db57c5699ac4e4e1a65473343a Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 16 Jul 2025 17:49:22 -0400 Subject: [PATCH 5/9] Use explicit path --- install/tududi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tududi-install.sh b/install/tududi-install.sh index 2b58d6eb..17cd07a0 100644 --- a/install/tududi-install.sh +++ b/install/tududi-install.sh @@ -21,7 +21,7 @@ NODE_VERSION="20" setup_nodejs msg_info "Installing Tududi" fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" -cd /opt/"$APPLICATION" +cd /opt/tududi $STD npm install export NODE_ENV=production $STD npm run frontend:build From be46cc130d77c133969bc1c2710ce942daf29ac5 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 16 Jul 2025 18:10:35 -0400 Subject: [PATCH 6/9] Alter post-installation text --- ct/tududi.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/tududi.sh b/ct/tududi.sh index ee134713..431ea85f 100644 --- a/ct/tududi.sh +++ b/ct/tududi.sh @@ -66,7 +66,6 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${ADVANCED}${BL}Create your initial user in${CL} ${BGN}/opt/${APP}${CL}${BL} in the LXC:${CL}" -echo -e "${TAB3}${BL}npm run user:create ${CL}" +echo -e "${ADVANCED}${BL}Create your initial user in${CL} ${BGN}/opt/${APP}${CL}${BL} in the LXC:${CL} ${RD}npm run user:create ${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3002${CL}" From c0b1b524913e59a01ef19a4b51ef5f3b1bcdcc21 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 16 Jul 2025 18:32:27 -0400 Subject: [PATCH 7/9] Increase RAM --- ct/tududi.sh | 2 +- frontend/public/json/tududi.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/tududi.sh b/ct/tududi.sh index 431ea85f..81c538c4 100644 --- a/ct/tududi.sh +++ b/ct/tududi.sh @@ -8,7 +8,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ APP="Tududi" var_tags="${var_tags:-todo-app}" var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-1024}" +var_ram="${var_ram:-2048}" var_disk="${var_disk:-4}" var_os="${var_os:-debian}" var_version="${var_version:-12}" diff --git a/frontend/public/json/tududi.json b/frontend/public/json/tududi.json index e8da8840..fd884ef5 100644 --- a/frontend/public/json/tududi.json +++ b/frontend/public/json/tududi.json @@ -20,7 +20,7 @@ "script": "ct/tududi.sh", "resources": { "cpu": 2, - "ram": 1024, + "ram": 2048, "hdd": 4, "os": "Debian", "version": "12" From 049fc60585f491929d36141c3d6878bfb47f2658 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 17 Jul 2025 08:43:37 +0200 Subject: [PATCH 8/9] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 18941379..39ecb5ca 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Generate a token id: generate-token - uses: actions/create-github-app-token@v1 + uses: actions/create-github-app-token@v2 with: app-id: ${{ vars.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} From d5b6b672edb771651fe571313c88c01239a79368 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 17 Jul 2025 08:47:28 +0200 Subject: [PATCH 9/9] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 39ecb5ca..339ed4c4 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -27,7 +27,7 @@ jobs: - name: Generate a token for PR approval and merge id: generate-token-merge - uses: actions/create-github-app-token@v1 + uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.APP_ID_APPROVE_AND_MERGE }} private-key: ${{ secrets.APP_KEY_APPROVE_AND_MERGE }}