Skip to content

Commit 2937516

Browse files
authored
New Script: bolt.diy (#2528)
* Add bolt.diy script * fixes
1 parent 92d2065 commit 2937516

File tree

3 files changed

+179
-0
lines changed

3 files changed

+179
-0
lines changed

ct/boltdiy.sh

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/stackblitz-labs/bolt.diy/
7+
8+
APP="boltdiy"
9+
TAGS="code;ai"
10+
var_cpu="2"
11+
var_ram="3072"
12+
var_disk="6"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/bolt.diy ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
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) }')
31+
if [[ "${RELEASE}" != "$(cat /opt/boltdiy_version.txt)" ]] || [[ ! -f /opt/boltdiy_version.txt ]]; then
32+
msg_info "Stopping $APP"
33+
systemctl stop boltdiy
34+
msg_ok "Stopped $APP"
35+
36+
msg_info "Updating $APP to v${RELEASE}"
37+
temp_dir=$(mktemp -d)
38+
temp_file=$(mktemp)
39+
cd $temp_dir
40+
wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
41+
tar xzf $temp_file
42+
cp -rf bolt.diy-${RELEASE}/* /opt/bolt.diy
43+
cd /opt/bolt.diy
44+
$STD pnpm install
45+
msg_ok "Updated $APP to v${RELEASE}"
46+
47+
msg_info "Starting $APP"
48+
systemctl start boltdiy
49+
msg_ok "Started $APP"
50+
51+
msg_info "Cleaning Up"
52+
rm -rf $temp_file
53+
rm -rf $temp_dir
54+
msg_ok "Cleanup Completed"
55+
56+
echo "${RELEASE}" >/opt/boltdiy_version.txt
57+
msg_ok "Update Successful"
58+
else
59+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
60+
fi
61+
exit
62+
}
63+
64+
start
65+
build_container
66+
description
67+
68+
msg_ok "Completed Successfully!\n"
69+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
70+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
71+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5173${CL}"

install/boltdiy-install.sh

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/stackblitz-labs/bolt.diy/
7+
8+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y \
18+
curl \
19+
sudo \
20+
mc \
21+
gnupg \
22+
git
23+
msg_ok "Installed Dependencies"
24+
25+
msg_info "Setup Node.js Repository"
26+
mkdir -p /etc/apt/keyrings
27+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
28+
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
29+
msg_ok "Setup Node.js Repository"
30+
31+
msg_info "Setup Node.js"
32+
$STD apt-get update
33+
$STD apt-get install -y nodejs
34+
$STD npm install -g pnpm
35+
msg_ok "Setup Node.js"
36+
37+
msg_info "Setup bolt.diy"
38+
temp_file=$(mktemp)
39+
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) }')
40+
wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
41+
tar xzf $temp_file
42+
mv bolt.diy-${RELEASE} /opt/bolt.diy
43+
cd /opt/bolt.diy
44+
$STD pnpm install
45+
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
46+
msg_ok "Setup bolt.diy"
47+
48+
msg_info "Creating Service"
49+
cat <<EOF >/etc/systemd/system/boltdiy.service
50+
[Unit]
51+
Description=bolt.diy Service
52+
After=network.target
53+
54+
[Service]
55+
Type=simple
56+
User=root
57+
WorkingDirectory=/opt/bolt.diy
58+
ExecStart=/usr/bin/pnpm run dev --host
59+
Restart=always
60+
61+
[Install]
62+
WantedBy=multi-user.target
63+
EOF
64+
systemctl enable -q --now boltdiy
65+
msg_ok "Created Service"
66+
67+
motd_ssh
68+
customize
69+
70+
msg_info "Cleaning up"
71+
rm -f $temp_file
72+
$STD apt-get -y autoremove
73+
$STD apt-get -y autoclean
74+
msg_ok "Cleaned"

json/boltdiy.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "bolt.diy",
3+
"slug": "boltdiy",
4+
"categories": [
5+
20
6+
],
7+
"date_created": "2025-02-21",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 5173,
12+
"documentation": "https://stackblitz-labs.github.io/bolt.diy/",
13+
"website": "https://github.com/stackblitz-labs/bolt.diy",
14+
"logo": "https://github.com/stackblitz-labs/bolt.diy/raw/refs/heads/main/icons/logo-text.svg",
15+
"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!",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/boltdiy.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 3072,
23+
"hdd": 6,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": []
34+
}

0 commit comments

Comments
 (0)