diff --git a/ct/boltdiy.sh b/ct/boltdiy.sh new file mode 100644 index 000000000..931eed883 --- /dev/null +++ b/ct/boltdiy.sh @@ -0,0 +1,71 @@ +#!/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: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/stackblitz-labs/bolt.diy/ + +APP="boltdiy" +TAGS="code;ai" +var_cpu="2" +var_ram="3072" +var_disk="6" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/bolt.diy ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/boltdiy_version.txt)" ]] || [[ ! -f /opt/boltdiy_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop boltdiy + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + temp_dir=$(mktemp -d) + temp_file=$(mktemp) + cd $temp_dir + wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file + tar xzf $temp_file + cp -rf bolt.diy-${RELEASE}/* /opt/bolt.diy + cd /opt/bolt.diy + $STD pnpm install + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start boltdiy + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf $temp_file + rm -rf $temp_dir + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/boltdiy_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} 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}:5173${CL}" diff --git a/install/boltdiy-install.sh b/install/boltdiy-install.sh new file mode 100644 index 000000000..17b4b2fec --- /dev/null +++ b/install/boltdiy-install.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/stackblitz-labs/bolt.diy/ + +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 \ + curl \ + sudo \ + mc \ + gnupg \ + git +msg_ok "Installed Dependencies" + +msg_info "Setup Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Setup Node.js Repository" + +msg_info "Setup Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g pnpm +msg_ok "Setup Node.js" + +msg_info "Setup bolt.diy" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file +tar xzf $temp_file +mv bolt.diy-${RELEASE} /opt/bolt.diy +cd /opt/bolt.diy +$STD pnpm install +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup bolt.diy" + +msg_info "Creating Service" +cat </etc/systemd/system/boltdiy.service +[Unit] +Description=bolt.diy Service +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/bolt.diy +ExecStart=/usr/bin/pnpm run dev --host +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now boltdiy +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/boltdiy.json b/json/boltdiy.json new file mode 100644 index 000000000..402f8caa3 --- /dev/null +++ b/json/boltdiy.json @@ -0,0 +1,34 @@ +{ + "name": "bolt.diy", + "slug": "boltdiy", + "categories": [ + 20 + ], + "date_created": "2025-02-21", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 5173, + "documentation": "https://stackblitz-labs.github.io/bolt.diy/", + "website": "https://github.com/stackblitz-labs/bolt.diy", + "logo": "https://github.com/stackblitz-labs/bolt.diy/raw/refs/heads/main/icons/logo-text.svg", + "description": "The official open source version of Bolt.new (previously known as oTToDev and bolt.new ANY LLM), which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK!", + "install_methods": [ + { + "type": "default", + "script": "ct/boltdiy.sh", + "resources": { + "cpu": 2, + "ram": 3072, + "hdd": 6, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] + }