diff --git a/ct/retype.sh b/ct/retype.sh new file mode 100644 index 0000000000..d555f4da17 --- /dev/null +++ b/ct/retype.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kairosys-dev +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://retype.com/ + +APP="Retype" +var_tags="${var_tags:-docs}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f "/root/retype.yml" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(npm view retype version) + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping Retype.service" + systemctl stop Retype.service + msg_ok "Stopped Retype.service" + + msg_info "Creating Backup" + tar -czf "/opt/Retype_backup_$(date +%F).tar.gz" /root/* + msg_ok "Backup Created" + + msg_info "Updating Retype to v${RELEASE}" + $STD npm install retypeapp --global + msg_ok "Updated Retype to v${RELEASE}" + + msg_info "Starting Retype.service" + systemctl start Retype.service + msg_ok "Started Retype.service" + + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. Retype is already at v${RELEASE}" + 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}:5001${CL}" diff --git a/frontend/public/json/retype.json b/frontend/public/json/retype.json new file mode 100644 index 0000000000..a667a4d886 --- /dev/null +++ b/frontend/public/json/retype.json @@ -0,0 +1,35 @@ +{ + "name": "Retype", + "slug": "retype", + "categories": [ + 12 + ], + "date_created": "2025-11-11", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 5001, + "documentation": "https://retype.com/", + "config_path": "/root/retype.yml", + "website": "https://retype.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/retype-light.svg", + "description": "Retype is a static website generator that builds a website based on simple Markdown (.md) text files. Focus on your writing while Retype builds the rest.", + "install_methods": [ + { + "type": "default", + "script": "ct/retype.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/retype-install.sh b/install/retype-install.sh new file mode 100644 index 0000000000..6b51452d1d --- /dev/null +++ b/install/retype-install.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kairosys-dev +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://retype.com/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +NODE_VERSION="22" NODE_MODULE="node-gyp" setup_nodejs + +msg_info "Setup Retype" +$STD npm install retypeapp --global +RELEASE=$(npm view retype version) +echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt +msg_ok "Setup Retype" + +msg_info "Creating Service" +cat </etc/systemd/system/Retype.service +[Unit] +Description=Retype Service +After=network.target + +[Service] +ExecStart=retype start --host 0.0.0.0 +Restart=always +WorkingDirectory=/root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now Retype.service +msg_ok "Created Service" + +motd_ssh +customize + +cleanup_lxc